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-2026-31431: From 732 Bytes to Root - Anatomy of a Modern Linux Privilege Escalation

CVE-2026-31431: From 732 Bytes to Root - Anatomy of a Modern Linux Privilege Escalation

CVE Research

CVE-2026-31431: From 732 Bytes to Root - Anatomy of a Modern Linux Privilege Escalation

Jun 24, 2026

Open CVE-2026-31431: The Nine-Year Kernel Bug Hiding in Plain Sight

CVE-2026-31431: The Nine-Year Kernel Bug Hiding in Plain Sight

CVE Research

CVE-2026-31431: The Nine-Year Kernel Bug Hiding in Plain Sight

Jun 23, 2026

Open Squidbleed: A 29-Year-Old Squid Proxy Flaw That Leaks Cleartext HTTP Requests
Squidbleed: A 29-Year-Old Squid Proxy Flaw That Leaks Cleartext HTTP Requests

CVE Research

Squidbleed: A 29-Year-Old Squid Proxy Flaw That Leaks Cleartext HTTP Requests

Jun 23, 2026

Open AryStinger Malware Leverages 4,300+ Legacy Routers to Establish Persistent Spy Infrastructure
AryStinger Malware Leverages 4,300+ Legacy Routers to Establish Persistent Spy Infrastructure

CVE Research

AryStinger Malware Leverages 4,300+ Legacy Routers to Establish Persistent Spy Infrastructure

AryStinger represents a calculated shift in IoT threat methodology, abandoning noisy, destructive payloads in favor of silent, long-term reconnaissance infrastructure. By exploiting unpatched, end-of-life routers and NAS devices through decade-old vulnerabilities, the threat operator has assembled a distributed fleet of over 4,300 Executor nodes capable of conducting parallelized DNS enumeration, port scanning, and service fingerprinting at scale, all while masking origin behind residential IP addresses. With active development ongoing and a potential operational timeline stretching back to 2024, AryStinger underscores a growing and underappreciated risk: forgotten edge hardware is not merely a compliance gap but exploitable infrastructure.

Jun 23, 2026

Critical NPM Package Vulnerability Puts AI and NLP Applications at Ris | SecPod