Skip to main content

expr-eval CVE-2026-12866

| EUVDEUVD-2026-38415 CRITICAL
Code Injection (CWE-94)
2026-06-23 snyk GHSA-q9v2-7m5w-4693
Critical
Disputed · 9.2 Vendor: snyk
Share

Severity by source

Sources disagree (Low–Critical)
Vendor (snyk) PRIMARY
9.2 CRITICAL
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
9.8 CRITICAL

Network-reachable API with no auth or interaction once the app exposes toJSFunction() to user input; full RCE yields high C/I/A within the same process scope.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat
4.2 LOW
qualitative

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: snyk

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

2
Analysis Generated
Jun 23, 2026 - 05:28 vuln.today
CVSS changed
Jun 23, 2026 - 05:22 NVD
9.8 (CRITICAL) 9.2 (CRITICAL)

DescriptionCVE.org

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.

AnalysisAI

Arbitrary JavaScript code execution in the expr-eval npm package affects all released versions when applications pass user-controlled expressions to the toJSFunction() API, which compiles them via new Function() and executes them in the host process context. Snyk discloses no public exploit identified at time of analysis, but the trivial attack pattern (sandbox escape via crafted math expressions) and CVSS 4.0 score of 9.2 make this a high-priority issue for any Node.js or browser application that exposes expr-eval to untrusted input.

Technical ContextAI

expr-eval is a JavaScript expression parser/evaluator originally written by silentmatt, commonly embedded in Node.js services, dashboards, and rules engines to let users supply mathematical or logical formulas. The vulnerable toJSFunction() helper takes the parsed AST and concatenates it into a JavaScript source string that is then handed to the built-in Function constructor, which is functionally equivalent to eval(). This is a textbook CWE-94 (Improper Control of Generation of Code) flaw: the library's tokenizer was designed to restrict syntax to expression-language operators, but because the final compilation step reaches the full JavaScript runtime, any payload that survives the tokenizer (or abuses operator/identifier handling in expression.js around line 55) escapes the intended sandbox and runs with the privileges of the host process.

RemediationAI

No vendor-released patch identified at time of analysis - the linked GitHub issue (#292) and the Snyk advisory do not cite a fixed version, so consumers should treat this as unpatched and act at the application layer. The most reliable compensating control is to stop calling toJSFunction() entirely and use Expression.evaluate() with a constrained variable scope, accepting the performance trade-off of interpreted rather than compiled evaluation. If toJSFunction() must remain, restrict its inputs to expressions authored by trusted operators (never end users), enforce a strict allowlist of identifiers and operators before parsing, and run the evaluator inside an isolated context such as vm2's successor isolated-vm or a separate Worker with no access to require, process, or globalThis; note that isolated-vm adds deployment complexity and Workers still share Node primitives unless explicitly stripped. Consider migrating to maintained alternatives such as mathjs (with its evaluate() in a scoped object) or filtrex, both of which avoid new Function() on user input.

More in N A

View all
CVE-2024-51092 CRITICAL POC
9.1 May 08

LibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutContr

CVE-2025-15684 MEDIUM POC
5.5 Aug 12

Reachable assertion in Open5GS up to version 2.7.6 allows remote unauthenticated attackers to crash the Diameter CER han

CVE-2024-45257 HIGH POC
7.3 May 08

A Command Injection issue in the payload build page in BYOB (Build Your Own Botnet) 2.0 allows attackers to execute arbi

CVE-2025-15687 LOW POC
2.1 Aug 12

Denial of service in Open5GS 2.7.6 and earlier allows network-adjacent attackers with low-privilege Diameter Gx peer acc

CVE-2025-15686 LOW POC
2.1 Aug 12

Denial of service in Open5GS HSS (Home Subscriber Server) versions 2.7.0 through 2.7.6 is triggered remotely by manipula

CVE-2025-67888 HIGH POC
7.3 May 08

Remote command injection in Control Web Panel allows unauthenticated attackers to execute arbitrary OS commands as root

CVE-2024-53326 HIGH POC
7.3 May 08

LINQPad before 5.52.01 Pro edition is vulnerable to Unsafe Deserialization in LINQPad.AutoRefManager::PopulateFromCache(

CVE-2026-38360 CRITICAL POC
9.8 May 08

Remote code execution in dash-uploader (Python package for Plotly Dash) versions 0.1.0 through 0.7.0a2 allows unauthenti

CVE-2026-30623 CRITICAL POC
9.8 Jul 15

Command injection in LiteLLM 1.18.10 lets attackers who can configure MCP (Model Context Protocol) servers supply arbitr

CVE-2026-67917 CRITICAL POC
9.8 Aug 17

SQL injection in AzuraCast's backup restore flow (versions up to and including 0.23.7) lets an attacker achieve privileg

CVE-2026-75337 CRITICAL POC
9.8 Aug 27

Arbitrary file read in Yu AI Code Mother v4.3 lets anonymous, remote attackers retrieve files outside the intended previ

CVE-2026-31072 CRITICAL POC
9.8 May 19

Remote code execution in APScheduler (all versions through 3.10.x and 4.0.0a5) is achievable when applications deseriali

Vendor StatusVendor

Share

CVE-2026-12866 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy