External risk intelligence

expr-eval JavaScript Expression Evaluator Code Execution Vulnerability

CVE advisorySeverity: CRITICAL (CVSS 9.8)

CVE-2025-12735

The vulnerability exists in a JavaScript library used for expression evaluation. While the library itself may be integrated into internet-facing applications that process user-provided mathematical expressions, it is a backend dependency rather than a standalone service, making its reachability entirely dependent on how developers implement it within their specific applications.

Code Injection

Jorenbroekema Javascript Expression Evaluator

3.0.02.0.2 and earlier

Halo Surface Signal: 3 out of 5 — possibly public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This CVE describes a critical vulnerability in a JavaScript library used for evaluating mathematical expressions. If exploited, an attacker could potentially execute arbitrary code on affected systems, which could have significant consequences for data integrity and system availability. The primary concern is to confirm if this library is in use and, if so, understand the extent of its exposure within our environment.

  • Flaw allows code execution via expression evaluation.
  • Critical vulnerability impacts JavaScript expression parsing.
  • Confirm usage and assess exposure to user input.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this by sending specially crafted input to a web application that uses the affected JavaScript expression evaluation library. This could lead to the attacker executing arbitrary code on the server.

  • No authentication or special privileges needed.
  • Malicious input sent to evaluate() function.
  • Server-side code execution and system compromise.

Live Threat

Current exploitation, exposure, and threat context

This vulnerability could allow an unauthenticated attacker to execute arbitrary code on a server running the expr-eval library when evaluating untrusted mathematical expressions. This could affect the availability and integrity of the affected service.

  • Server-side code execution.
  • Malicious expressions submitted by users.
  • Service compromise and data exposure.

Operational Fix

Recommended remediation, mitigation, and detection steps

The expr-eval JavaScript library's remote code execution vulnerability impacts Node.js applications. Application owners or platform teams integrating this library are primarily responsible for identifying its usage, assessing business criticality, and planning remediation. Coordination with vendor-management teams may be necessary if the library is part of a third-party solution, and initial triage should focus on confirming exposure and owner accountability.

  • Identify affected applications and owners.
  • Verify exposure and business criticality.
  • Plan remediation based on risk.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is the expr-eval library and how is it used?

The expr-eval library is a JavaScript utility designed to parse and compute mathematical expressions. Developers commonly integrate it into Node.js applications to provide features like custom calculation engines, data processing tools, or user-defined variable logic, allowing systems to safely handle and solve complex numeric strings within an application's workflow.

How does CVE-2025-12735 lead to arbitrary code execution?

This vulnerability is classified as CWE-94, or Improper Control of Generation of Code. The library fails to sufficiently validate input passed to its primary evaluate() function. An attacker can supply a specially crafted object that tricks the library into running unauthorized commands on the host server instead of merely performing a mathematical calculation.

Does any input trigger this vulnerability?

No, the flaw specifically requires the application to pass untrusted, user-controlled data into the library's evaluate() function. Simple mathematical expressions or inputs that do not attempt to manipulate the context object or member access are unlikely to trigger this path. The danger arises when the library is used to handle data from external, unverified sources.

Is my application vulnerable if it uses expr-eval?

Halo Surface Signal indicates that since expr-eval is a backend dependency, its reachability depends entirely on your specific implementation. If your application takes input from the internet and directly feeds it into the library, it is more exposed. If the library is used only internally with trusted, hardcoded values, the risk profile is significantly different.

What is the first step to address this CVE?

Begin by auditing your codebase to determine where and how the library is invoked. Identify applications that process user-provided expressions and assess their business criticality. Once usage is confirmed, prioritize restricting input sources or updating the library to a version where this evaluation logic is hardened to prevent unauthorized execution.

References