Angular Expressions - Remote Code Execution when using locals
Critical severity
GitHub Reviewed
Published
Dec 10, 2024
in
peerigon/angular-expressions
•
Updated Dec 10, 2024
Description
Published by the National Vulnerability Database
Dec 10, 2024
Published to the GitHub Advisory Database
Dec 10, 2024
Reviewed
Dec 10, 2024
Last updated
Dec 10, 2024
Impact
An attacker can write a malicious expression that escapes the sandbox to execute arbitrary code on the system.
Example of vulnerable code:
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/
References