CVE-2023-29374: In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrar
CVE-2023-29374 is a critical-severity flaw (CVSS 9.8) affecting langchain. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrary code via the Python exec method.
Why this priority
- Critical severity
- EPSS top 1%: very likely to be exploited
- Public exploit reference
- CISA SSVC: automatable with total technical impact
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 39.7% (top 1%) |
| CISA exploited list | No |
| Weakness | CWE-74 |
| Published | 2023-04-05 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Exact fixes by distribution
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2023-29374?
langchain: upgrade to newer than 0.0.131. Exact commands for each OS are on this page.
Is CVE-2023-29374 being exploited?
CVE-2023-29374 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2023-29374 affect?
CVE-2023-29374 affects langchain. Severity is critical (CVSS 9.8). In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrary code via the Python exec method.
How urgent is CVE-2023-29374?
Priority 72/100. Critical severity; EPSS top 1%: very likely to be exploited; Public exploit reference; CISA SSVC: automatable with total technical impact; Remotely exploitable, no login, no user action
Software pages
Python vulnerabilities · OpenAI and LLM tools vulnerabilities
Related CVEs
- CVE-2026-44843 HIGH 8.2 UPGRADE LangChain is a framework for building agents and LLM-powered applications
- CVE-2024-58340 HIGH 7.5 UPGRADE LangChain versions up to and including 0.3.1 contain a regular expression denial-of-service (ReDoS) vulnerabil
- CVE-2023-36095 CRITICAL 9.8 DOWNGRADE An issue in Harrison Chase langchain v.0.0.194 allows an attacker to execute arbitrary code via the python exe
- CVE-2026-55443 MEDIUM 5.1 UPGRADE LangChain is a framework for building agents and LLM-powered applications
- CVE-2025-2828 CRITICAL 10.0 UPGRADE A Server-Side Request Forgery (SSRF) vulnerability exists in the RequestsToolkit component of the langchain-co