CVE Catalog

CVE-2024-58340

HighCVSS 7.5
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.41%

33th percentile - higher than 33% of all known CVEs

Summary

A ReDoS vulnerability in LangChain up to version 0.3.1 exists in the MRKLOutputParser.parse() method. An attacker can supply crafted text (e.g., via prompt injection) causing excessive CPU consumption and parsing delays, leading to denial of service.

Risk Assessment

The risk is the potential for a DoS attack on applications using LangChain, which can disrupt their operation and affect service availability for users.

Recommendation

It is recommended to immediately update LangChain to version 0.3.2 or later, which includes a fix for the ReDoS vulnerability.

Other vulnerabilities in LangChain

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS