CVE-2024-46946criticalCode execution2024-09-19
CVE-2024-46946: LangChain Experimental Eval Injection vulnerability
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 it is
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).
How to check
- Affected: langchain-experimental (pip) >= 0.1.17, <= 0.3.0.
- Compare your installed version with the range above (command below).
How to fix
- No patched version of langchain-experimental is listed yet. Follow the advisory for mitigations.
pip show langchain-experimental | grep Version Sources
More advisories for this tool
- criticalCVE-2026-75128: Langchain-Chatchat lets anyone run shell commands through /tools/call
- criticalCVE-2024-27444: LangChain Experimental vulnerable to arbitrary code execution
- criticalCVE-2023-32785: Langchain SQL Injection vulnerability
- highCVE-2026-119978: Flowise through 3.1.4 lets logged-in users escape the custom-function sandbox and run OS commands when ALLOW_BUILTIN_DEP=true