{"id":"CVE-2024-58340","published":"2026-01-12T23:05:00Z","modified":"2026-07-14T22:54:52Z","title":"LangChain <= 0.3.1 MRKLOutputParser ReDoS","vendor":"LangChain AI","product":"LangChain","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.7,"severity":"HIGH","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00481,"percentile":0.42385,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://huntr.com/bounties/e7ece02c-d4bb-4166-8e08-6baf4f8845bb","tags":["technical-description","exploit"]},{"url":"https://www.langchain.com/","tags":["product"]},{"url":"https://github.com/langchain-ai/langchain","tags":["product"]},{"url":"https://www.vulncheck.com/advisories/langchain-mrkloutputparser-redos","tags":["third-party-advisory"]}],"priority":{"score":19.6,"factors":[{"name":"EPSS percentile","points":8.48},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.09}]},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"LangChain AI","product":"LangChain","versions":["<= 0.3.1"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-01-13T16:21:27.783338Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langchain-exa","vulnerableRanges":["<1.0.0a1"],"patched":["1.0.0a1"],"from":["PYSEC-2026-75"],"provenance":"source"}],"summary":{"text":"LangChain versions up to and including 0.3.1 contain a regular expression denial-of-service flaw in the MRKLOutputParser.parse() method of the agents/mrkl output parser, which applies a backtracking-prone regex when extracting tool actions from model output. An attacker who can supply or influence the parsed text, such as through prompt injection in a downstream application that passes LLM output directly into the parser, can send a crafted payload over the network without authentication or user interaction to cause excessive CPU consumption and a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:16:03Z"},"euvd":{"id":"EUVD-2026-2399","exploited":false,"provenance":"source"},"exploitRefs":["https://huntr.com/bounties/e7ece02c-d4bb-4166-8e08-6baf4f8845bb"]}