{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-2965","id":"CVE-2024-2965","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, leadin","descriptionLong":"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.","published":"2024-06-06T18:52:54.353Z","updated":"2026-10-28T02:30:28.755688584Z","reserved":"2024-03-26T19:55:25.763Z","status":"Modified","rejected":false,"assigner":"@huntr_ai","metric":{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"OSV"},{"version":"3.0","score":4.2,"vector":"CVSS:3.0/AV:P/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"@huntr_ai"},{"version":"3.0","score":4.2,"vector":"CVSS:3.0/AV:P/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"huntr.dev"},{"version":"3.0","score":4.2,"vector":"CVSS:3.0/AV:P/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"OSV"},{"version":"3.0","score":4.2,"vector":"CVSS:3.0/AV:P/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"GitHub"}],"rating":"medium","products":["langchain-ai/langchain"],"affectedProducts":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","defaultStatus":null,"versions":[{"version":"unspecified","lessThan":"0.2.5","status":"affected","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"langchain-community","purl":"pkg:pypi/langchain-community","ranges":["<0.2.5"],"fixed":["0.2.5"],"advisory":"GHSA-3hjh-jh2h-vrg6"},{"ecosystem":"PyPI","name":"langchain","purl":"pkg:pypi/langchain","ranges":["<0.2.5"],"fixed":["0.2.5"],"advisory":"GHSA-3hjh-jh2h-vrg6"}],"cwes":["CWE-674","CWE-400"],"aliases":["GHSA-3hjh-jh2h-vrg6","PYSEC-2024-118","PYSEC-2026-2561"],"references":[{"url":"https://huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae","tags":["x_transferred","Exploit","Third Party Advisory","web","evidence"]},{"url":"https://github.com/langchain-ai/langchain/commit/73c42306745b0831aa6fe7fe4eeb70d2c2d87a82","tags":["fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/2xxx/CVE-2024-2965.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-2965","tags":["advisory"]},{"url":"https://github.com/langchain-ai/langchain/pull/22903","tags":["web"]},{"url":"https://github.com/langchain-ai/langchain/commit/9a877c7adbd06f90a2518152f65b562bd90487cc","tags":["web"]},{"url":"https://github.com/langchain-ai/langchain","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-118.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-3hjh-jh2h-vrg6","tags":["advisory"]},{"url":"https://pypi.org/project/langchain-community","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00304,"epssPercentile":0.23524,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-2965","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-2965","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-2965","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-3hjh-jh2h-vrg6","ok":true,"note":"GHSA-3hjh-jh2h-vrg6"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-2965","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}