Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. expr-eval
  4. ›
  5. CVE-2026-12866

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

June 23, 2026 (updated September 22, 2026)

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.

References

  • github.com/advisories/GHSA-q9v2-7m5w-4693
  • github.com/silentmatt/expr-eval/blob/master/src/expression.js
  • github.com/silentmatt/expr-eval/issues/292
  • nvd.nist.gov/vuln/detail/CVE-2026-12866
  • security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-17662018
  • security.snyk.io/vuln/SNYK-JS-EXPREVAL-15054690

Code Behaviors & Features

Detect and mitigate CVE-2026-12866 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 2.0.2

Solution

Unfortunately, there is no solution available yet.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

npm/expr-eval/CVE-2026-12866.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 24 Sep 2026 12:25:55 +0000.