{"cve":"CVE-2024-58340","nvd":{"published":"2026-01-12T23:15:51.780","modified":"2026-07-14T23:17:18.157","status":"Analyzed","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_v4":{"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","score":8.7},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-1333"],"references":["https://github.com/langchain-ai/langchain","https://huntr.com/bounties/e7ece02c-d4bb-4166-8e08-6baf4f8845bb","https://www.langchain.com/","https://www.vulncheck.com/advisories/langchain-mrkloutputparser-redos"],"products":["langchain:langchain"],"source":"nvd","synced_at":"2026-10-19T22:19:41.481987139+00:00"},"epss":{"cve":"CVE-2024-58340","score":0.00481,"percentile":0.41486,"date":"2026-10-31"},"kev":null,"osv":[{"id":"PYSEC-2026-75","url":"https://osv.dev/vulnerability/PYSEC-2026-75","summary":"","modified":"2026-05-20T09:19:04.132922Z","packages":[{"ecosystem":"PyPI","name":"langchain-exa","purl":"pkg:pypi/langchain-exa","ranges":["<1.0.0a1"],"fixed":["1.0.0a1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}