Vulnerabilities · 2024 · Langchain
CVE-2024-46946
Langchain-experimental 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).
High priority: this vulnerability is rated critical and can be attacked over the network without a login.
Affected products
Langchain-experimental. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Langchain-experimental runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- gist.github.com/12end/68c0c58d2564ef4141bccd4651480820#file-cve-2024-46946-txt · Exploit
- cwe.mitre.org/data/definitions/95.html
- docs.sympy.org/latest/modules/codegen.html
- github.com/langchain-ai/langchain/releases/tag/langchain-experimental%3D%3D0.3.0
- nvd.nist.gov/vuln/detail/CVE-2024-46946
- github.com/advisories/GHSA-p2qj-r53j-h3xj
- github.com/pypa/advisory-database/tree/main/vulns/langchain-experimental/PYSEC-2026-374.ya
- pypi.org/project/langchain-experimental
- nvd.nist.gov/vuln/detail/CVE-2024-46946
- cve.org/CVERecord?id=CVE-2024-46946
More vulnerabilities in Langchain products
CVE-2025-68665CVE-2025-68664CVE-2025-2828CVE-2024-58340CVE-2024-38459CVE-2024-28088CVE-2024-27444CVE-2024-21513All 34
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.