CVE-2024-58340
published high CVSS 4.0 · 8.7LangChain <= 0.3.1 MRKLOutputParser ReDoS
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| LangChain AI | — | LangChain0 through 0.3.1 · Other versions: unknown | Affected | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.7 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| LangChain AI | LangChain | 0 through 0.3.1 (affected · semver)Default: unknown | VulnCheck · cna |
Weaknesses
1- CWE-1333 CWE-1333 Inefficient Regular Expression Complexity
References
4Provider assertions
2VulnCheck · cna
LangChain <= 0.3.1 MRKLOutputParser ReDoS
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- abbe4e644ae0243befb47fb397dd5f3c5e43e570ca7d02d8c0beeb65fb0e904b
- Ingested
- 23 Sep 2026, 08:32:30 UTC
- Source record
- Official CVE record