{"id":"CVE-2024-2965","state":"PUBLISHED","title":"Denial-of-Service in LangChain SitemapLoader in langchain-ai/langchain","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.","publishedAt":"2024-06-06T18:52:54.353Z","updatedAt":"2025-10-15T12:50:22.559Z","severity":{"score":4.2,"label":"Medium","version":"3.0","vector":"CVSS:3.0/AV:P/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"@huntr_ai"},"assigner":"@huntr_ai","products":["langchain-ai langchain-ai/langchain"],"affected":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","versions":[{"version":"unspecified","status":"affected","lessThan":"0.2.5","versionType":"custom"}]}],"references":["https://huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae","https://github.com/langchain-ai/langchain/commit/73c42306745b0831aa6fe7fe4eeb70d2c2d87a82"],"weaknesses":["CWE-674"],"ingestedAt":"2026-10-29T20:07:21.467Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/2xxx/CVE-2024-2965.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-2965","state":"PUBLISHED","datePublished":"2024-06-06T18:52:54.353Z","dateUpdated":"2025-10-15T12:50:22.559Z","assignerShortName":"@huntr_ai","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2024-03-26T19:55:25.763Z"},"containers":{"cna":{"title":"Denial-of-Service in LangChain SitemapLoader in langchain-ai/langchain","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","versions":[{"version":"unspecified","status":"affected","lessThan":"0.2.5","versionType":"custom"}]}],"references":[{"url":"https://huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae"},{"url":"https://github.com/langchain-ai/langchain/commit/73c42306745b0831aa6fe7fe4eeb70d2c2d87a82"}],"metrics":[{"cvssV3_0":{"version":"3.0","attackComplexity":"HIGH","attackVector":"PHYSICAL","availabilityImpact":"HIGH","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.0/AV:P/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":4.2,"baseSeverity":"MEDIUM"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-674","type":"CWE","lang":"en","description":"CWE-674 Uncontrolled Recursion"}]}],"providerMetadata":{"shortName":"@huntr_ai","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2025-10-15T12:50:22.559Z"},"source":{"advisory":"90b0776d-9fa6-4841-aac4-09fde5918cae","discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"langchain","product":"langchain","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"*","versionType":"custom"}],"cpes":["cpe:2.3:a:langchain:langchain:*:*:*:*:*:*:*:*"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-06-07T13:30:27.318825Z","id":"CVE-2024-2965","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-07T19:03:21.881Z"}},{"title":"CVE Program Container","references":[{"url":"https://huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-01T19:32:42.613Z"}}]}}}