| Component | LangChain (langchain-experimental) |
| Severity | critical (CVSS 9.8) |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published (NVD) | 2024-09-19 |
| Last modified | 2026-06-17 |
| Affected versions | >= 0.1.17, <= 0.3.0 from the GitHub-reviewed advisory GHSA-p2qj-r53j-h3xj |
| Fixed in | see the vendor advisory |
| Weakness | CWE-20 |
| CISA KEV | not listed |
Versions, checked against NVD
NVD's analysis gives the same ranges as the GitHub-reviewed advisory GHSA-p2qj-r53j-h3xj.
NVD description
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
- No fixed release is known yet: follow the vendor advisory below and keep LangChain off the public internet until a fix ships.
- Do not expose the component's API or UI to the internet without authentication in front of it.