Vulnerabilities

CVE-2024-58340

High 7.5 CVSS 3.1

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.

Description as published by the source, in English.

Key facts

Published
2026-01-12
Last modified
2026-07-14
Assigned by
disclosure@vulncheck.com
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Scored by
nvd@nist.gov (NVD Primary)
Probability of exploitation
0.4 % higher than 34 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Not registered in the sources

Affected products

Vendor Product Versions Status
Langchain Langchain ≤ 0.3.1 Affected

Weakness type

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities