-
CVSS Score
-| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| angular-expressions | npm | < 1.4.3 | 1.4.3 |
The vulnerability stems from two key issues:
ASTCompiler used new Function(...) to generate executable code without mitigating access to Function.prototype.constructor. Attackers could exploit this via prototype pollution (e.g., __proto__.constructor) to bypass the sandbox.ASTInterpreter allowed access to inherited properties (like __proto__) from the locals object when using two-argument invocation. This enabled prototype chain traversal to reach dangerous built-in functions.
The commit introduced runWithFunctionConstructorProtection to block Function constructor access and added hasOwnProperty checks for locals validation, confirming these were the vulnerable points.