CVE-2024-46946: LangChain Experimental arbitrary code execution through LLMSymbolicMathChain
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2024-46946
- Published
- Record updated
- Affected
- langchain-experimental >= 0.1.17, <= 0.3.0
- Fixed in
- No fixed version was stated when the source was last read.
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 1.4%
Summary
CVE-2024-46946 affects langchain_experimental (LangChain Experimental) versions 0.1.17 through 0.3.0. The flaw lies in LLMSymbolicMathChain, which passes input to sympy.sympify, which uses eval, allowing attackers to execute arbitrary code. The chain was introduced on 2023-10-05, and NVD has not yet provided an assessment.
Mitigation
Release notes for langchain-experimental==0.3.0 are referenced in the source, but the source does not state the fix or a workaround in its text. The source text does not describe a mitigation; see https://github.com/langchain-ai/langchain/releases/tag/langchain-experimental%3D%3D0.3.0 for release notes.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- langchain-experimentalPyPILLM dependency since 2023-07-21 · 1 tracked dependent
Related items
- MediumGHSA-8prr-f582-jqq3: LangGraph CLI prints the registry push token in `langgraph deploy --verbose` outputSame vendor · GitHub Advisory Database
- HighGHSA-4hm6-w6qq-w73v: LangGraph JavaScript custom authentication may permit cross-user Store accessSame vendor · GitHub Advisory Database
- MediumGHSA-3fx2-cqw9-xr3c: LangGraph: Unencoded identifiers in LangGraph SDK v3 streaming can redirect authenticated GET requestsSame vendor · GitHub Advisory Database
- MediumGHSA-6hmw-9432-67qq: LangGraph: Namespace labels containing `.` reach other namespaces in Postgres and SQLite storesSame vendor · GitHub Advisory Database
- MediumCVE-2026-108575: BerriAI LiteLLM improper authorization in secret resolution via api_keySame vendor · NVD/CVE Database