Cyber Resilience

CVE-2024-2965

DoS in Langchain ≤ 0.2.5

Public PoCDoS
Published
06 June 2024
Modified
21 November 2024
CVSS Score v3.1 4.7
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS Score 0.0030 23th percentile
Risk Priority 37 floored blend · peak EPSS

Summary

CVE-2024-2965 is a medium-severity Uncontrolled Recursion (CWE-674) vulnerability in Langchain Langchain. Its CVSS base score is 4.7 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Endpoint Denial of Service (T1499); ranked at the 23th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

This vulnerability is AI-related — categorised as LLM Application Platforms.

The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) and SC-5 (Denial-of-service Protection) — see the control section below for these in your framework.

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

AI Security AnalysisAI

AI Category
LLM Application Platforms
Risk Domain
N/A
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: langchain, ai, langchain

Related Threats

MITRE ATT&CK Enterprise Techniques

T1499 Endpoint Denial of Service Impact
Adversaries may perform Endpoint Denial of Service (DoS) attacks to degrade or block the availability of services to users.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-1455Same product: Langchain Langchain
CVE-2023-38896Same product: Langchain Langchain
CVE-2024-28088Same product: Langchain Langchain
CVE-2026-55443Same product: Langchain Langchain
CVE-2024-0243Same product: Langchain Langchain
CVE-2023-34541Same product: Langchain Langchain
CVE-2023-36095Same product: Langchain Langchain
CVE-2023-39631Same product: Langchain Langchain
CVE-2023-36188Same product: Langchain Langchain
CVE-2023-38860Same product: Langchain Langchain

Affected Assets

langchain
langchain
≤ 0.2.5

Mitigating Controls

Mitigating Controls (NIST 800-53 r5) AI

Input validation can reject or constrain data that would otherwise drive unbounded recursive calls.

DoS protection mechanisms limit the resource-exhaustion impact of uncontrolled recursion without eliminating the flaw.

System monitoring can observe anomalous resource consumption that signals runaway recursion after it begins.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly prevent coding errors such as missing recursion limits or termination conditions.

DE.CM-09 partial match
prevents

Runtime monitoring of compute resources can detect excessive consumption caused by uncontrolled recursion.

ID.RA-01 partial match
prevents

Vulnerability identification processes can discover and record uncontrolled recursion flaws before deployment.

PR.IR-04 partial match
prevents

Capacity monitoring and resource provisioning can absorb or limit the impact of runaway recursion.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing in development can detect excessive recursion via static analysis or fuzzing.

prevents

Secure development life cycle requires controls that prevent uncontrolled recursion through design and code review.

prevents

Application security requirements can mandate recursion limits or stack-depth checks.

prevents

Secure system architecture principles include resource-management and input-validation rules that limit recursion.

prevents

Secure coding standards directly prohibit or constrain recursive constructs that could exhaust stack or memory.

finds

Capacity management includes monitoring and limits that mitigate resource exhaustion from runaway recursion.

References