Critical severity9.8NVD Advisory· Published Jun 23, 2026· Updated Jul 7, 2026
CVE-2026-12866
CVE-2026-12866
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
expr-evalnpm | <= 2.0.2 | — |
org.webjars.npm:expr-evalMaven | <= 2.0.2 | — |
Affected products
2- Package: https://npmjs.com/package/expr-eval
Patches
Vulnerability mechanics
References
7- github.com/advisories/GHSA-q9v2-7m5w-4693ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-12866ghsaADVISORY
- github.com/silentmatt/expr-eval/blob/master/src/expression.jsghsaWEB
- github.com/silentmatt/expr-eval/issues/292nvdWEB
- security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-17662018nvdWEB
- security.snyk.io/vuln/SNYK-JS-EXPREVAL-15054690nvdWEB
- github.com/silentmatt/expr-eval/blob/master/src/expression.js%23L55nvd
News mentions
0No linked articles in our index yet.