High severity · published Jan 12, 2026
CVE-2024-58340
LangChain <= 0.3.1 MRKLOutputParser ReDoS
7.5
CVSS
0.5%
EPSS
No
On KEV
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 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.5% · higher than 41% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
LA
LangChain · LangChain AI
through 0.3.1 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-58340
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-58340
Product
https://github.com/langchain-ai/langchain
Exploit
https://huntr.com/bounties/e7ece02c-d4bb-4166-8e08-6baf4f8845bb
Product
https://www.langchain.com/
Third Party Advisory
https://www.vulncheck.com/advisories/langchain-mrkloutputparser-redos
More from LangChain
8.3
CVE-2025-65106
LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates
8.2
CVE-2026-44843
LangChain: Unsafe deserialization of attacker-controlled LangChain objects through overly broad `load()` allowlists
8.2
CVE-2025-68664
LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs
7.5
CVE-2026-34070
LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
5.5
CVE-2026-55443
LangChain: Path traversal and sandbox escape in LangChain file-search middleware and loaders
