---
title: "CVE-2026-12866: expr-eval vulnerable to Code Execution"
url: https://erroneo.us/security/cve/CVE-2026-12866/
description: "CVE-2026-12866 (expr-eval (npm)): All versions of the package expr-eval are vulnerable to Code Execution via the toJSFunction() API. An attacker can execute…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-06-23
date_modified: 2026-09-22
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-12866"
kev: false
cvss: 9.2
epss: 0.00866
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2026-12866: expr-eval vulnerable to Code Execution

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.9% , percentile 58: FIRST’s model estimates a 0.9% chance of exploitation activity in the next 30 days, higher than 58% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes expr-eval (npm) <= 2.0.2, no fixed version listed ; org.webjars.npm:expr-eval (Maven) <= 2.0.2, no fixed version listed . Check your lockfile, including transitive dependencies.

## What it is

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.

## Affected packages

- npm `expr-eval` <= 2.0.2 → fixed: none listed
- Maven `org.webjars.npm:expr-eval` <= 2.0.2 → fixed: none listed

## Affected products (CVE record)

- n/a expr-eval: < *
- n/a org.webjars.npm:expr-eval: < *

## Severity

- snyk CVSS 4.0: 9.2 `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- snyk CVSS 3.1: 9.8 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub CVSS 4.0: 9.2 `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable yes , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.87% probability of exploitation activity in the next 30 days; percentile 58.

## Sources

- [GitHub Advisory GHSA-q9v2-7m5w-4693](https://github.com/advisories/GHSA-q9v2-7m5w-4693)
- [CVE.org record CVE-2026-12866](https://www.cve.org/CVERecord?id=CVE-2026-12866)
- [NVD entry CVE-2026-12866](https://nvd.nist.gov/vuln/detail/CVE-2026-12866)
- [security.snyk.io](https://security.snyk.io/vuln/SNYK-JS-EXPREVAL-15054690)
- [security.snyk.io](https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-17662018)
- [github.com](https://github.com/silentmatt/expr-eval/blob/master/src/expression.js%23L55)
- [github.com](https://github.com/silentmatt/expr-eval/issues/292)
- [github.com](https://github.com/silentmatt/expr-eval/blob/master/src/expression.js#L55)

---
Source page: https://erroneo.us/security/cve/CVE-2026-12866/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
