High

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_pa

  • Disclosed: 12.01.2026
  • Updated: 11.10.2026 12:19

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) langchain-exa < 1.0.0a1 1.0.0a1

References

CVSS score 7.5/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness (CWE)
-
Platform
Python (PyPI)
Package
langchain-exa
Disclosed
12.01.2026
Updated
11.10.2026 12:19

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-75 - PyPA Advisory Database; CC BY 4.0

Vulnerability history: langchain-exa

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
2
First → latest
02.2024 01.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Low 1

Disclosures per year

  1. 2024: 1
  2. 2025: 0
  3. 2026: 1
  1. 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_pa this entry
    High · 7.5 CVE-2024-58340 < 1.0.0a1 1.0.0a1
  2. Low · 3.7 CVE-2024-0243 < 0.1.0 0.1.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.