{"id":"CVE-2024-2965","published":"2024-06-06T18:52:54Z","modified":"2025-10-15T12:50:22Z","title":"Denial-of-Service in LangChain SitemapLoader in langchain-ai/langchain","vendor":"langchain-ai","product":"langchain-ai/langchain","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.2,"severity":"MEDIUM","version":"3.0","vector":"CVSS:3.0/AV:P/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00304,"percentile":0.23748,"provenance":"source"},"cwes":[{"id":"CWE-674","name":"Uncontrolled Recursion"}],"references":[{"url":"https://huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae","tags":[]},{"url":"https://github.com/langchain-ai/langchain/commit/73c42306745b0831aa6fe7fe4eeb70d2c2d87a82","tags":[]}],"priority":{"score":7.7,"factors":[{"name":"EPSS percentile","points":4.75},{"name":"CVSS severity","points":2.94}]},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","versions":[">= unspecified, < 0.2.5"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-06-07T13:30:27.318825Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langchain-community","vulnerableRanges":["<0.2.5"],"patched":["0.2.5"],"from":["GHSA-3hjh-jh2h-vrg6","PYSEC-2026-2561"],"provenance":"source"},{"ecosystem":"PyPI","package":"langchain","vulnerableRanges":["<0.2.5"],"patched":["0.2.5"],"from":["GHSA-3hjh-jh2h-vrg6","PYSEC-2024-118"],"provenance":"source"}],"summary":{"text":"A denial-of-service flaw exists in the SitemapLoader class of the langchain-ai/langchain repository, specifically in its parse_sitemap method, which lacks protection against infinite recursion when a sitemap URL points back to the sitemap being parsed. An attacker who can get the loader to process a sitemap that references itself can trigger unbounded recursion, crashing the Python process and disrupting services that depend on it.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:06Z"},"euvd":{"id":"EUVD-2024-0090","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-2828","published":"2025-06-23","fixed":"0.0.28","kev":false},{"cve":"CVE-2024-5998","published":"2024-09-17","fixed":"0.2.4","kev":false,"link":{"from":"CVE-2024-2965","to":"CVE-2024-5998","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain","fromFixed":"0.2.5","toFixed":"0.2.9","daysApart":103}]}},{"cve":"CVE-2024-2965","published":"2024-06-06","fixed":"0.2.5","kev":false},{"cve":"CVE-2024-3095","published":"2024-06-06","fixed":"0.2.9","kev":false,"link":{"from":"CVE-2024-2965","to":"CVE-2024-3095","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain-community","fromFixed":"0.2.5","toFixed":"0.2.9","daysApart":0}]}},{"cve":"CVE-2024-8309","published":"2024-10-29","fixed":"0.2.19","kev":false},{"cve":"CVE-2025-6984","published":"2025-09-04","fixed":"0.3.27","kev":false}],"package":"PyPI:langchain-community"}}