CRITICAL9.8
PYSEC-2026-374
LangChain Experimental Eval Injection vulnerability
Details
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).
Are you affected?
Enter the version of the package you're using.
Affected packages
PyPI/langchain-experimental
Introduced in:
0.1.17No fixed version published yet for langchain-experimental (pip). Pin to a known-safe version or switch to an alternative.
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-46946[ADVISORY]
- https://docs.sympy.org/latest/modules/codegen.html[WEB]
- https://gist.github.com/12end/68c0c58d2564ef4141bccd4651480820#file-cve-2024-46946-txt[WEB]
- https://github.com/langchain-ai/langchain[PACKAGE]
- https://github.com/langchain-ai/langchain/releases/tag/langchain-experimental%3D%3D0.3.0[WEB]
- https://pypi.org/project/langchain-experimental[PACKAGE]
- https://github.com/advisories/GHSA-p2qj-r53j-h3xj[ADVISORY]