angular-expressions
Affected
- introduced
0, fixed1.1.2(semver)
Fixed versions
1.1.2
Fix
- Fixed version
1.1.2npm install [email protected]
Advisory
Also known as: CVE-2021-21277
Angular Expressions - Remote Code Execution
Impact
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.
Patches
Users should upgrade to version 1.1.2 of angular-expressions
Workarounds
A temporary workaround might be either to :
OR
if (/^[|a-zA-Z.0-9 :"'+-?]+$/.test(userControlledInput)) {
var result = expressions.compile(userControlledInput);
}
else {
result = undefined;
}
References
Removal of angular-expression sandbox
For more information
If you have any questions or comments about this advisory:
Credits
The issue was reported by Maxime Nadeau from GoSecure, Inc.
High Basis: The source's own band: HIGH
0, fixed 1.1.2 (semver)1.1.2
1.1.2npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0