---
id: CVE-2026-12866
aliases:
  - GHSA-q9v2-7m5w-4693
title: expr-eval vulnerable to Code Execution
summary: expr-eval vulnerable to Code Execution
severity: critical
cvss: 9.8
cwe:
  - CWE-94
vendor: expr-eval
product: expr-eval
ecosystem: npm
affected:
  - expr-eval <= 2.0.2
  - 'org.webjars.npm:expr-eval <= 2.0.2'
published: '2026-06-23'
updated: '2026-09-22'
sourceUpdated: '2026-09-22T14:40:56Z'
source: GHSA
sourceUrl: 'https://github.com/advisories/GHSA-q9v2-7m5w-4693'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-12866'
  - url: 'https://github.com/silentmatt/expr-eval/issues/292'
  - url: 'https://security.snyk.io/vuln/SNYK-JS-EXPREVAL-15054690'
  - url: 'https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-17662018'
  - url: 'https://github.com/silentmatt/expr-eval/blob/master/src/expression.js#L55'
  - url: 'https://github.com/advisories/GHSA-q9v2-7m5w-4693'
tags:
  - ghsa
  - npm
epss: 0.00866
epssPercentile: 0.57151
ingestedAt: '2026-09-22T15:05:01.073Z'
---

## Overview

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

- `expr-eval <= 2.0.2`
- `org.webjars.npm:expr-eval <= 2.0.2`

## Remediation

Refer to the advisory for the patched release.
