angular-expressions
Affected
- introduced
0, fixed1.4.3(semver)
Fixed versions
1.4.3
Fix
- Fixed version
1.4.3npm install [email protected]
Advisory
Also known as: CVE-2024-54152
Angular Expressions - Remote Code Execution when using locals
Impact
An attacker can write a malicious expression that escapes the sandbox to execute arbitrary code on the system.
Example of vulnerable code:
const expressions = require("angular-expressions");
const result = expressions.compile("__proto__.constructor")({}, {});
// result should be undefined, however for versions <=1.4.2, it returns an object.
With a more complex (undisclosed) payload, one can get full access to Arbitrary code execution on the system.
Patches
The problem has been patched in version 1.4.3 of angular-expressions.
Workarounds
There is one workaround if it not possible for you to update :
const result = expressions.compile("__proto__.constructor")({}); : in this case you lose the feature of locals if you need it.Credits
Credits go to JorianWoltjer who has found the issue and reported it to use. https://jorianwoltjer.com/
Critical Basis: The source's own band: CRITICAL
0, fixed 1.4.3 (semver)1.4.3
1.4.3npm 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