8.7

CVE-2024-58340: LangChain <= 0.3.1 MRKLOutputParser ReDoS

Analyzed
AliasesPYSEC-2026-75
Published 12-01-2026Last modified 14-07-2026

Vulnerability summary

CVE-2024-58340 is a high (CVSS 8.7) vulnerability in langchain ai langchain. EPSS estimates a 0.48% chance of exploitation in the next 30 days, higher than 43.1% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Prioritisepublic exploit

Public exploit (reference, Date unknown)

Source freshness unavailable

How is this decided?
CVSS score
8.7/10
010
High · v4.0 (CVE.org)
EPSS score
0.48%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1reference

Timeline

  1. 12-01-2026
    PublishedVulnerability first disclosed.
  2. 14-07-2026
    Last modifiedVulnerability information updated.

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 metrics

4 scores · 3 sources · 2 versions

EPSS trend

Probability

0.48%

Chance of exploitation in the next 30 days

Percentile

43%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.48% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • referenceUnverified

    Exploit Reference (huntr.com)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Langchain1 product
Langchain ai1 product
PyPI1 product
  • langchain-exa< 1.0.0a1

3 vendors · 3 products

References

4 links