CVE-2024-58340: langchain ai langchain
Vulnerability summary
CVE-2024-58340 is a high (CVSS 8.7) vulnerability in langchain ai langchain. EPSS estimates a 0.48% chance of exploitation in the next 30 days, higher than 40.1% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 12-01-2026PublishedVulnerability first disclosed.
- 14-07-2026Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
4 scores · 3 sources · 2 versions- NVDNIST8.7HighCVSS: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
- NVDNIST7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.48%
Chance of exploitation in the next 30 days
Percentile
40%
Versus all other CVEs
30-day change
+0.01 pp
From 0.47% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundExploit Reference (huntr.com)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Langchain1 product
- langchain≤ 0.3.1
Langchain ai1 product
- langchain≤ 0.3.1
PyPI1 product
- langchain-exa< 1.0.0a1
3 vendors · 3 products
References
4 links- huntr.com/bounties/e7ece02c-d4bb-4166-8e08-6baf4f8845bbTechnical DescriptionExploitREPORTIssue TrackingThird Party Advisory