CVE-2026-12866: Code Execution in expr-eval
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.
AI Analysis
Technical Summary
CVE-2026-12866 affects all versions of the expr-eval package. The vulnerability arises because the toJSFunction() API compiles user-supplied expressions into native JavaScript code using new Function(). Since these expressions are directly transformed into executable code without sufficient sandboxing, attackers can escape the intended expression sandbox and execute arbitrary JavaScript code. This leads to remote code execution in the context of the vulnerable application. The CVSS 4.0 score is 9.2, indicating a critical severity with network attack vector, low attack complexity, no privileges or user interaction required, and high impact on confidentiality, integrity, and availability. There is no vendor advisory or patch available at this time, and no known exploits in the wild have been reported.
Potential Impact
Successful exploitation allows an unauthenticated attacker to execute arbitrary JavaScript code remotely within the context of the vulnerable application. This can lead to full compromise of the application environment, including data theft, manipulation, or denial of service. The vulnerability is critical due to its ease of exploitation and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid using the toJSFunction() API with untrusted input or implement strict input validation and sandboxing measures to prevent execution of malicious expressions.
CVE-2026-12866: Code Execution in 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
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-12866 affects all versions of the expr-eval package. The vulnerability arises because the toJSFunction() API compiles user-supplied expressions into native JavaScript code using new Function(). Since these expressions are directly transformed into executable code without sufficient sandboxing, attackers can escape the intended expression sandbox and execute arbitrary JavaScript code. This leads to remote code execution in the context of the vulnerable application. The CVSS 4.0 score is 9.2, indicating a critical severity with network attack vector, low attack complexity, no privileges or user interaction required, and high impact on confidentiality, integrity, and availability. There is no vendor advisory or patch available at this time, and no known exploits in the wild have been reported.
Potential Impact
Successful exploitation allows an unauthenticated attacker to execute arbitrary JavaScript code remotely within the context of the vulnerable application. This can lead to full compromise of the application environment, including data theft, manipulation, or denial of service. The vulnerability is critical due to its ease of exploitation and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid using the toJSFunction() API with untrusted input or implement strict input validation and sandboxing measures to prevent execution of malicious expressions.
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: 06/23/2026, 05:39:06 UTC
Last updated: 06/24/2026, 02:09:07 UTC
Views: 66
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.