Back

CRITICAL

expr-eval: expr-eval: Code Execution via crafted expressions in toJSFunction() API

Published Jun 23, 2026

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.

Affected products

Remediation

Red Hat statement

RHEL AI 3.4 bootc images ship expr-eval@2.0.2 as a dependency of @langchain/community. The only identified consumer is the LangChain Calculator tool, which calls Parser.evaluate() and does not invoke toJSFunction(). CVE-2026-12866 affects only the toJSFunction() API. No other npm package in the image depends on expr-eval. For this reason the issue is rated Low for RHEL AI.

Red Hat mitigation

LangChainJS already replaced expr-eval with math-expression-evaluator in a later @langchain/community release (fix for CVE-2025-12735). Bootc owners should bump @langchain/community to a version that no longer bundles expr-eval, which removes the dead dependency entirely.

Metrics

References (10)

Change history (0)

No recorded changes yet.

Sources
CVE.org / MITRE
Status PUBLISHED
Assigner snyk
Published Jun 23, 2026
Updated Aug 14, 2026
Reserved Jun 22, 2026
CISA Vulnrichment
Updated Jun 23, 2026
NVD
Status Deferred
Modified Jul 7, 2026
Red Hat
Severity Low
Public date Jun 23, 2026
GHSA-Q9V2-7M5W-4693