SecPod

Learn Search

Search across all Learn content

← Back to Security Research
Critical NPM Package Vulnerability Puts AI and NLP Applications at Risk of Exploitation

Critical NPM Package Vulnerability Puts AI and NLP Applications at Risk of Exploitation

The discovery of CVE-2025-12735 reveals a critical remote code execution (RCE) weakness in the popular JavaScript expression-evaluation library expr-eval. Exploitation allows an attacker who can supply crafted input to influence the parser’s evaluation context and execute arbitrary system-level comm...

Nov 10, 2025By Aparna Hegde3 min read

The discovery of CVE-2025-12735 reveals a critical remote code execution (RCE) weakness in the popular JavaScript expression-evaluation library expr-eval. Exploitation allows an attacker who can supply crafted input to influence the parser’s evaluation context and execute arbitrary system-level commands, putting servers and AI/NLP applications that evaluate user-provided expressions at immediate risk.

Vulnerability Details

Remote Code Execution (CVE-2025-12735)

The root cause is a design flaw in the library’s Parser (specifically the evaluate() function) that does not sufficiently limit or validate function objects provided via the variables/context parameter. An attacker can register or pass specially crafted functions in the evaluation context which the parser will invoke, enabling arbitrary JavaScript execution that can be escalated to system command execution in certain runtimes and hosting configurations.

An application that accepts user-supplied expressions or variables and calls parser.evaluate(userExpression, userVariables) without strictly validating/allowlisting functions can be tricked into invoking attacker-controlled code paths. In environments where the JS runtime or surrounding code exposes system interfaces, that can lead to execution of shell commands, file access, or data exfiltration. Public advisories and vendor notices describe the flaw as allowing arbitrary code execution via crafted variables/expressions.

Affected Products

  • expr-eval –All versions
  • expr-eval-fork — versions prior to 3.0.0 are vulnerable

Tactics, Techniques, and Procedures (TTPs)

  • TA0001 – Initial Access: Exploit public-facing application (T1190) by sending malicious input to an application using expr-eval.
  • TA0002 – Execution: Command and Scripting Interpreter (T1059), including Unix Shell (T1059.004) when the environment allows escalation to OS command execution.These mappings reflect the practical exploitation path: attacker-supplied expressions code execution in application context potential system command execution. (See public advisories and the NVD/GHSA advisory for technical context.)

Mitigations & Recommendations

  • Apply the patch referenced in the upstream fix (Pull Request #288): The patch enforces an allowlist of safe functions, requires explicit registration for custom functions, and adds tests to prevent unrestricted function invocation through evaluate(). If you maintain your own vendored copy, merge the PR or equivalent changes immediately.
  • Upgrade to the patched package: Upgrade to the patched release of expr-eval/expr-eval-fork (the fork’s v3.0.0 and corresponding patched versions are published). Use your package manager to update dependencies and rebuild/deploy. After upgrading, run your test suite and validate expression-handling code paths.

Instantly Fix Risks with Saner Patch Management

Saner patch management is a continuous, automated, and integrated software that instantly fixes risks exploited in the wild. The software supports major operating systems like Windows, Linux, and macOS, as well as 550+ third-party applications.

It also allows you to set up a safe testing area to test patches before deploying them in a primary production environment. Saner patch management additionally supports a patch rollback feature in case of patch failure or a system malfunction.

Experience the fastest and most accurate patching software here

Featured Posts

Open CVE-2023-49105: The ownCloud Authentication Flaw That Exposed Sensitive Credentials
CVE-2023-49105: The ownCloud Authentication Flaw That Exposed Sensitive Credentials

CVE Research

CVE-2023-49105: The ownCloud Authentication Flaw That Exposed Sensitive Credentials

Sep 25, 2026

Open Patch Analysis & Exploitation Timeline: RouterOS SSH Attacks Predate Production Fixes in CISA's September 10, 2026 KEV Additions
Patch Analysis & Exploitation Timeline: RouterOS SSH Attacks Predate Production Fixes in CISA's September 10, 2026 KEV Additions

CVE Research

Patch Analysis & Exploitation Timeline: RouterOS SSH Attacks Predate Production Fixes in CISA's September 10, 2026 KEV Additions

Two MikroTik RouterOS CVEs entered CISA KEV seven days after production fixes. Dated reporting places SSH-chain exploitation involving CVE-2026-86060 at least one calendar day before those releases; no comparable start date is established for CVE-2026-67277.

Sep 25, 2026

Open Patch Analysis & Exploitation Timeline: A Day-Old Chrome Bug and an Eight-Month-Old Fortinet Flaw Share the Same KEV Batch
Patch Analysis & Exploitation Timeline: A Day-Old Chrome Bug and an Eight-Month-Old Fortinet Flaw Share the Same KEV Batch

CVE Research

Patch Analysis & Exploitation Timeline: A Day-Old Chrome Bug and an Eight-Month-Old Fortinet Flaw Share the Same KEV Batch

Four vulnerabilities added to CISA’s KEV catalog on September 9, 2026 show widely different timelines between public disclosure and formal exploitation-based prioritization, ranging from one day to 239 days.

Sep 24, 2026

Open TA412/APT31: Mapping Threat Actor Patterns to CVE Exploitation Chains

TA412/APT31: Mapping Threat Actor Patterns to CVE Exploitation Chains

CVE Research

TA412/APT31: Mapping Threat Actor Patterns to CVE Exploitation Chains

A chronological look at how a long-running China-nexus espionage cluster evolved from server-side exploitation to a chained Chrome/Windows zero-day kit — and what that shift signals.

Sep 24, 2026