The vulnerability, reported by GoSecure Inc, allows Remote Code Execution, if you call expressions.compile(userControlledInput)
where userControlledInput
is text that comes from user input.
This time, the security of the package could be bypassed by using a more complex payload, using a .constructor.constructor
technique.
Users should upgrade to version 1.1.2 of angular-expressions
A temporary workaround might be either to :
OR
if (/^[|a-zA-Z.0-9 :"'+-?]+$/.test(userControlledInput)) {
var result = expressions.compile(userControlledInput);
}
else {
result = undefined;
}
Removal of angular-expression sandbox
If you have any questions or comments about this advisory: * Open an issue in angular-expressions * Email us
The issue was reported by Maxime Nadeau from GoSecure, Inc.
{ "nvd_published_at": "2021-02-01T15:15:00Z", "github_reviewed_at": "2021-02-01T15:00:53Z", "severity": "HIGH", "github_reviewed": true, "cwe_ids": [ "CWE-74", "CWE-94" ] }