CVE-2024-2965: langchain-ai/langchain - Denial of Service
- Cve: CVE-2024-2965
- Name: langchain-ai/langchain - Denial of Service
- 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.
- Impact: Attackers can cause a crash or resource exhaustion, leading to denial of service and service unavailability.
- Remediation: Implement a recursion depth limit or cycle detection in parse_sitemap method to prevent infinite loops.
- Vulnerability type: denial_of_service
- Vulnerability impact: denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 4.7
- Cvss vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
- Epss score: 0.00304
- Epss percentile: 0.23529
- Assignee: [email protected]
- Published at: 2024-06-06T19:15:55Z
- Age in days: 901
- Modified at: 2026-06-17T07:25:55Z
- Patch available: yes
- Public exploits total: 1
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-2965
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-674 | Uncontrolled Recursion |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae | nvd | 2024-06-06 |
References
| Url | Source | Tags |
|---|---|---|
| https://huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae | nvd | Exploit, Third Party Advisory |
| https://github.com/langchain-ai/langchain/commit/73c42306745b0831aa6fe7fe4eeb70d2c2d87a82 | nvd |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| langchain:langchain | < 0.2.5 | no | nvd | /v1/products/langchain/langchain |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| langchain-ai/langchain | commit, fix, package, pull | yes | /v1/repositories/langchain-ai/langchain |
Index
- Repositories: 686
- Repositories high signal: 320
- Packages: 2
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2024-06-06
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, remote
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts