CVE-2024-46946
CRITICAL 9.8CVSS 3.1LangChain 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).
- Published
- 19 Sep 2024
- Last modified
- 27 Oct 2026
- Assigned by
- cve@mitre.org
- NVD status
- Analyzed
- Weakness
- CWE-20CWE-95
- Also known as
- GHSA-p2qj-r53j-h3xjPYSEC-2026-374
- Sources
- NVDJSONOSV GHSA-p2qj-r53j-h3xjJSONOSV PYSEC-2026-374JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | |
| OSV | PyPA | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N | |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | PyPA | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | langchain | langchain-experimentalcpe:2.3:a:langchain:langchain-experimental:*:*:*:*:*:*:*:* |
>= 0.1.17, <= 0.3.0 | |
| OSV | PyPI | langchain-experimental | >= 0.1.17, <= 0.3.0 |
References
- https://cwe.mitre.org/data/definitions/95.html · Not Applicable
- https://docs.sympy.org/latest/modules/codegen.html · Technical Description, WEB
- https://gist.github.com/12end/68c0c58d2564ef4141bccd4651480820#file-cve-2024-46946-txt · Exploit, Third Party Advisory, WEB
- https://github.com/langchain-ai/langchain/releases/tag/langchain-experimental%3D%3D0.3.0 · Release Notes, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-46946 · ADVISORY
- https://github.com/langchain-ai/langchain · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/langchain-experimental/PYSEC-2026-374.yaml · WEB
- https://pypi.org/project/langchain-experimental · WEB, PACKAGE
- https://github.com/advisories/GHSA-p2qj-r53j-h3xj · ADVISORY
History
- 25 Nov 2026 20:56 UTC · NVD: first stored (published 19 Sep 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 29 Jun 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 19 Sep 2024)