CVE-2024-58340Langchain
High 8.7 No auth needed
Follow: this CVE · Langchain · Langchain We alert you by email or Slack (account required).
- Priority
- 67
- CVSS 4.0
- 8.7
- EPSS
- 0.9% probability of exploitation in 30 days · percentile 56
- Auth required
- No
- Published
- Jan 12, 2026
- Updated
- Jul 14, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-1333
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
LangChain versions up to and including 0.3.1 contain a regular expression denial-of-service (ReDoS) vulnerability in the MRKLOutputParser.parse() method (libs/langchain/langchain/agents/mrkl/output_parser.py). The parser applies a backtracking-prone regular expression when extracting tool actions from model output. An attacker who can supply or influence the parsed text (for example via prompt injection in downstream applications that pass LLM output directly into MRKLOutputParser.parse()) can trigger excessive CPU consumption by providing a crafted payload, causing significant parsing delays and a denial-of-service condition.
What to do
- Apply the vendor's security update for Langchain.
- 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-exa |
< 1.0.0a1 |
1.0.0a1 |
pip install "langchain-exa>=1.0.0a1" |
Per OSV / GitHub Advisories (PYSEC-2026-75). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| langchain | langchain | ≤ 0.3.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Product
- huntr.com Exploit Issue Tracking Third Party Advisory
- www.langchain.com Product
- www.vulncheck.com Third Party Advisory