CVE-2024-46946Langchain-experimental
Critical 9.8 No auth needed
Follow: this CVE · Langchain · Langchain-experimental We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 2.1% probability of exploitation in 30 days · percentile 82
- Auth required
- No
- Published
- Sep 19, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-20
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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 to do
- Apply the vendor's security update for Langchain-experimental.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | langchain-experimental |
≥ 0.1.17 ≤ 0.3.0 |
no fixed version | — |
| PyPI | langchain-experimental |
≥ 0.1.17 ≤ 0.3.0 |
no fixed version | — |
Per OSV / GitHub Advisories (GHSA-p2qj-r53j-h3xj, PYSEC-2026-374). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| langchain | langchain-experimental | ≥ 0.1.17 ≤ 0.3.0 |
Official sources
References
Links published by the sources. Open them with care.
- cwe.mitre.org Not Applicable
- docs.sympy.org Technical Description
- gist.github.com Exploit Third Party Advisory
- github.com Release Notes