expr-eval vulnerable to Prototype Pollution
The npm package expr-eval is vulnerable to prototype pollution, allowing an attacker with access to its evaluation interface to achieve arbitrary code execution. The expr-eval-fork package fixes the issue.
silentmatt/expr-eval
Originally disclosed on huntr
npm package expr-eval is vulnerable to Prototype Pollution. An attacker with access to express eval interface can use JavaScript prototype-based inheritance model to achieve arbitrary code execution. The npm expr-eval-fork package resolves this issue.
From the GitHub Advisory Database (GHSA-8gw3-rxh4-v6jx, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely unsafe handling of object properties during expression evaluation allows modification of the JavaScript prototype chain.
Impact
An attacker with access to the evaluation interface could achieve arbitrary code execution.
What the attacker needed
Access to expr-eval interface
The fix
The issue was fixed by using the expr-eval-fork package instead.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Prototype pollution is a JavaScript flaw where an attacker can add or change properties on a base object that many other objects inherit from. In this package, that flaw can be escalated to running arbitrary code. The report is very brief and does not explain the exact mechanism.
What is Prototype pollution?
Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.