CVE-2024-58340
highpriority · track · 30EPSS 0.005 · 41 %ileDEEUUSEPSS · scored 2026-10-27
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
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 6.6–8.7
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (5)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2026-0103LangChain (MRKLOutputParser): Schwachstelle ermöglicht Denial of ServiceDeutsch2026-01-13csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann eine Schwachstelle in LangChain ausnutzen, um einen Denial of Service Angriff durchzuführen.
- PYSEC-2026-752026-01-12vendor · osvUS
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.
also known as (4)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (13)
External citations — patches, advisories, analysis.
- https://github.com/langchain-ai/langchaincnnvd
- https://github.com/langchain-ai/langchain/releasesPatchcnnvd
- https://huntr.com/bounties/e7ece02c-d4bb-4166-8e08-6baf4f8845bbcnnvd
- https://www.langchain.com/cnnvd
- https://www.vulncheck.com/advisories/langchain-mrkloutputparser-redoscnnvd
- https://github.com/langchain-ai/langchainenisa_euvd
- https://huntr.com/bounties/e7ece02c-d4bb-4166-8e08-6baf4f8845bbenisa_euvd
- https://www.langchain.com/enisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan