GitHub Advisoryadvisory · npm, Maven
GHSA-q9v2-7m5w-4693 expr-eval vulnerable to Code Execution
CRITICAL
Official page ↗
- Aliases
- CVE-2026-12866
- Ecosystem
- npm, Maven
- Packages
- expr-eval, org.webjars.npm:expr-eval
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-94
- Reviewed
- 2026-09-22
Affected packages
• npm expr-eval: <= 2.0.2 (no fix yet)
• Maven org.webjars.npm:expr-eval: <= 2.0.2 (no fix yet)
Description
All versions of the package expr-eval are vulnerable to Code Execution via the toJSFunction() API. An attacker can execute arbitrary JavaScript by supplying crafted expressions that are compiled into native code using new Function(). Because user-controlled expressions are transformed directly into executable JavaScript, attackers can escape the intended expression sandbox and run arbitrary code within the application's context.
Related
Alias · CVE (1)
- CVE-2026-12866 All versions of the package expr-eval are vulnerable to Code Execution via the toJSFunction() API. vulnerability
Weakness · CWE (1)
- CWE-94 Improper Control of Generation of Code weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-12866 advisory
- https://github.com/silentmatt/expr-eval/issues/292 web
- https://github.com/silentmatt/expr-eval package
- https://github.com/silentmatt/expr-eval/blob/master/src/expression.js#L55 web
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-17662018 web
- https://security.snyk.io/vuln/SNYK-JS-EXPREVAL-15054690 web