Description
The expr-eval library is a JavaScript expression parser and evaluator designed to safely evaluate mathematical expressions with user-defined variables. However, due to insufficient input validation, an attacker can pass a crafted variables object into the evaluate() function and trigger arbitrary code execution.
Problem types
CWE-94: Improper Control of Generation of Code (‘Code Injection’)
CWE-1321: Improperly Controlled Modification of Object Prototype Attributes (‘Prototype Pollution’)
Product status
Credits
This issue was reported by Jangwoo Choe (UKO)
References
www.kb.cert.org/vuls/id/263614
github.com/silentmatt/expr-eval
github.com/jorenbroekema/expr-eval
www.npmjs.com/package/expr-eval-fork
www.npmjs.com/package/expr-eval
github.com/silentmatt/expr-eval/pull/288