Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.5%top 60%

CVE-2026-12866: Code Execution in expr-eval

0
Critical
VulnerabilityCVE-2026-12866cvecve-2026-12866
Published: 06/23/2026 (06/23/2026, 05:00:00 UTC)
Source: CVE Database V5
Product: expr-eval

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.

CVSS v4.0

Score 9.2critical

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

expr-eval
pkg:npm/expr-eval
Affected versions
*

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/08/2026, 10:46:49 UTC

Technical Analysis

CVE-2026-12866 affects all versions of the expr-eval package. The vulnerability is due to the toJSFunction() API compiling user-supplied expressions into JavaScript code using new Function(), which allows attackers to execute arbitrary code by escaping the expression sandbox. This is a code injection vulnerability categorized under CWE-94 (Improper Control of Generation of Code). The CVSS 4.0 base score is 9.2, indicating a critical severity with network attack vector, low attack complexity, no privileges required, no user interaction, and high impact on confidentiality, integrity, and availability. No official patch or remediation guidance is currently available.

Potential Impact

Successful exploitation allows an unauthenticated attacker to execute arbitrary JavaScript code within the context of the vulnerable application. This can lead to full compromise of the application environment, including data theft, manipulation, or service disruption. The vulnerability affects confidentiality, integrity, and availability at a high level.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid using the toJSFunction() API with untrusted input or implement strict input validation and sanitization to prevent malicious expressions from being processed.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
snyk
Date Reserved
2026-06-22T08:22:34.991Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a3a187eeed863c81e3ed8ee

Added to database: 06/23/2026, 05:24:14 UTC

Last enriched: 07/08/2026, 10:46:49 UTC

Last updated: 08/05/2026, 00:41:11 UTC

Views: 226

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses