LangChainPublished 19 Sept 2024NVD status: Analyzed

CVE-2024-46946

langchain_experimental (aka LangChain Experimental) 0.1.17 through 0.3.0 for LangChain allows attackers to execute arbitrary code through sympy.sympify (which uses eval) in LLMSymbolicMathChain.

ComponentLangChain (langchain-experimental)
Severitycritical (CVSS 9.8)
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published (NVD)2024-09-19
Last modified2026-06-17
Affected versions
>= 0.1.17, <= 0.3.0
from the GitHub-reviewed advisory GHSA-p2qj-r53j-h3xj
Fixed insee the vendor advisory
WeaknessCWE-20
CISA KEVnot listed

Versions, checked against NVD

NVD's analysis gives the same ranges as the GitHub-reviewed advisory GHSA-p2qj-r53j-h3xj.

NVD description

langchain_experimental (aka LangChain Experimental) 0.1.17 through 0.3.0 for LangChain allows attackers to execute arbitrary code through sympy.sympify (which uses eval) in LLMSymbolicMathChain. LLMSymbolicMathChain was introduced in fcccde406dd9e9b05fc9babcbeb9ff527b0ec0c6 (2023-10-05).

What to do

  • No fixed release is known yet: follow the vendor advisory below and keep LangChain off the public internet until a fix ships.
  • Do not expose the component's API or UI to the internet without authentication in front of it.

Sources