Vulnerabilities

Vulnerability · CVE-2024-58340

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/a

Published Jan 12, 2026 · catalog updated Jul 14, 2026 · LangChain AI

Last checked Oct 29, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2024-58340. EPSS is 0.48%. Act only if a listed version of LangChain AI is installed.

Gaps on this record

  • No vendor fix or required action is stored. Compare the linked advisory before you change production.

Same product and reporting

Severity
High8.7
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.48%
Remediation
Vendor / distro source
Affected products
vendor LangChain AI langchain 0 ≤0.3.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_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

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • vendor LangChain AI langchain 0 ≤0.3.10 ≤0.3.1

How to fix CVE-2024-58340

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2024-58340. EPSS is 0.48%. Act only if a listed version of LangChain AI is installed.

Which versions are affected?

Compare what you have installed with LangChain AI langchain 0 ≤0.3.1 0 ≤0.3.1. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

No weakness class is stored. EPSS 0.48%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Jan 12, 2026 · EUVD

    Detected

    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 inj

  2. Jul 14, 2026 · EUVD

    Updated

    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 inj

Sources

  • CVE.orgVulnerability recordCVE-2024-58340

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2024-58340

    30-day exploitation probability 0.48%

    first.org
  • EUVDVulnerability recordEUVD-2026-2399

    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 extrac

    euvd.enisa.europa.eu

References

Freshness

Last verified in this catalog Oct 29, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • CVE.orgOct 29, 2026
  • FIRST EPSSOct 29, 2026
  • EUVDOct 29, 2026