4.7

CVE-2024-2965: langchain-ai langchain-ai/langchain Uncontrolled Recursion

CVSS: 4.7v3.1MediumModified
AliasesGHSA-3hjh-jh2h-vrg6PYSEC-2024-118PYSEC-2026-2561
Published 06-06-2024Last modified 15-10-2025

Vulnerability summary

CVE-2024-2965 is a medium (CVSS 4.7) Uncontrolled Recursion vulnerability in langchain-ai langchain-ai/langchain. EPSS estimates a 0.30% chance of exploitation in the next 30 days, higher than 21.7% of scored vulnerabilities. 1 public exploit is recorded.

Overall risk
29/100
0100
Medium · default modelHow is this calculated?
CVSS score
4.7/10
010
Medium · v3.1 (NVD)
EPSS score
0.30%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits1reference

Timeline

  1. 06-06-2024
    PublishedVulnerability first disclosed.
  2. 15-10-2025
    Last modifiedVulnerability information updated.

Description

A Denial-of-Service (DoS) vulnerability exists in the `SitemapLoader` class of the `langchain-ai/langchain` repository, affecting all versions. The `parse_sitemap` method, responsible for parsing sitemaps and extracting URLs, lacks a mechanism to prevent infinite recursion when a sitemap URL refers to the current sitemap itself. This oversight allows for the possibility of an infinite loop, leading to a crash by exceeding the maximum recursion depth in Python. This vulnerability can be exploited to occupy server socket/port resources and crash the Python process, impacting the availability of services relying on this functionality.

CVSS metrics

4 scores · 3 sources · 2 versions

EPSS trend

Probability

0.30%

Chance of exploitation in the next 30 days

Percentile

22%

Versus all other CVEs

30-day change

0.00 pp

From 0.30% on 19-09-2026

19-09-202619-10-2026
EPSS score
0.30%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

1 found
  • referenceUnverified

    Exploit Reference (huntr.com)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

PyPI2 products
  • langchain< 73c42306745b0831aa6fe7fe4eeb70d2c2d87a82 | < 0.2.5
  • langchain-community< 0.2.5
Langchain1 product
Langchain-ai1 product

3 vendors · 4 products

References

9 links