PT-2024-22949 · Langchain Ai · Langchain

Published

2024-06-06

·

Updated

2024-11-03

·

CVE-2024-2965

CVSS v3.1

4.7

Medium

VectorAV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Name of the Vulnerable Software and Affected Versions langchain-ai/langchain versions prior to 0.2.5 langchain-community versions prior to 0.2.5
Description A Denial-of-Service (DoS) issue exists in the SitemapLoader class due to the parse sitemap method lacking a mechanism to prevent infinite recursion when a sitemap URL refers to itself. This allows for an infinite loop, leading to a crash by exceeding the maximum recursion depth in Python, which can occupy server resources and impact service availability.
Recommendations For langchain-ai/langchain versions prior to 0.2.5, update to version 0.2.5 or later. For langchain-community versions prior to 0.2.5, update to version 0.2.5 or later. As a temporary workaround, consider disabling the parse sitemap method in the SitemapLoader class until a patch is available.

Exploit

Fix

Resource Exhaustion

Uncontrolled Recursion

Weakness Enumeration

Related Identifiers

CVE-2024-2965
GHSA-3HJH-JH2H-VRG6
PYSEC-2024-118

Affected Products

Langchain