Live threats

All CVEs / Langchain

CVE-2024-2965Langchain

Medium 4.7

Priority
28
CVSS 3.1
4.7
EPSS
0.3%
probability of exploitation in 30 days · percentile 11
Auth required
Yes
Published
Jun 6, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-674
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Langchain.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI langchain < 0.2.5 0.2.5 pip install "langchain>=0.2.5"
PyPI langchain < 0.2.5 0.2.5 pip install "langchain>=0.2.5"
PyPI langchain-community < 0.2.5 0.2.5 pip install "langchain-community>=0.2.5"
PyPI langchain-community < 0.2.5 0.2.5 pip install "langchain-community>=0.2.5"

Per OSV / GitHub Advisories (GHSA-3hjh-jh2h-vrg6, PYSEC-2024-118, PYSEC-2026-2561). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
langchainlangchain< 0.2.5

Official sources

References

Links published by the sources. Open them with care.