{"schemaVersion":3,"id":"CVE-2024-2965","aliases":["GHSA-3hjh-jh2h-vrg6","PYSEC-2024-118","PYSEC-2026-2561"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2024-06-06T18:52:54.353Z","modified":"2025-10-15T12:50:22.559Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":4.7,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.0","versionLabel":"v3.0","source":"CVE.org","score":4.2,"severity":"medium","vector":"CVSS:3.0/AV:P/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.0","versionLabel":"v3.0","source":"OSV · Pypi","score":4.2,"severity":"medium","vector":"CVSS:3.0/AV:P/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":1.3,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":4.7,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.0","versionLabel":"v3.0","source":"NVD","score":4.2,"severity":"medium","vector":"CVSS:3.0/AV:P/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00304,"percentile":0.21753,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00304},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00304,"percentile":0.21753}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00304,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00304,"percentile":0.21753}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_CC44ECE605DB6071","name":"Exploit Reference (huntr.com)","source":"reference","url":"https://huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-674","name":"Uncontrolled Recursion","description":"The product does not properly control the amount of recursion that takes place,  consuming excessive resources, such as allocated memory or the program stack.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/674.html"}],"affected":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","name":"langchain-ai/langchain","label":"langchain-ai/langchain","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ unspecified, < 0.2.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ unspecified, < 0.2.5","eol":null,"hubHref":"/vendor/langchain-ai/langchain-ailangchain"},{"vendor":"langchain","product":"langchain","name":"langchain","label":"langchain","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 0.2.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.2.5","eol":null,"hubHref":"/vendor/langchain/langchain"},{"vendor":"PyPI","product":"langchain","name":"langchain","label":"langchain","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/langchain","purlType":"pypi","versions":[{"text":"< 73c42306745b0831aa6fe7fe4eeb70d2c2d87a82","noFixRecorded":false,"fixedIn":null},{"text":"< 0.2.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 73c42306745b0831aa6fe7fe4eeb70d2c2d87a82 | < 0.2.5","eol":null,"hubHref":null},{"vendor":"PyPI","product":"langchain-community","name":"langchain-community","label":"langchain-community","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/langchain-community","purlType":"pypi","versions":[{"text":"< 0.2.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.2.5","eol":null,"hubHref":null}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae","label":"huntr.com/bounties/90b0776d-9fa6-4841-aac4-09fde5918cae","hostname":"huntr.com","tags":["WEB","EVIDENCE","Exploit","Third Party Advisory"]},{"url":"https://github.com/langchain-ai/langchain/commit/73c42306745b0831aa6fe7fe4eeb70d2c2d87a82","label":"github.com/langchain-ai/langchain/commit/73c42306745b0831aa6fe7fe4eeb70d2c2d87a82","hostname":"github.com","tags":["WEB","FIX"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-2965","label":"nvd.nist.gov/vuln/detail/CVE-2024-2965","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/langchain-ai/langchain/pull/22903","label":"github.com/langchain-ai/langchain/pull/22903","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/langchain-ai/langchain/commit/9a877c7adbd06f90a2518152f65b562bd90487cc","label":"github.com/langchain-ai/langchain/commit/9a877c7adbd06f90a2518152f65b562bd90487cc","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/langchain-ai/langchain","label":"github.com/langchain-ai/langchain","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-118.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-118.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-3hjh-jh2h-vrg6","label":"github.com/advisories/GHSA-3hjh-jh2h-vrg6","hostname":"github.com","tags":["Advisory"]},{"url":"https://pypi.org/project/langchain-community","label":"pypi.org/project/langchain-community","hostname":"pypi.org","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2024-06-06T18:52:54.353Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-10-15T12:50:22.559Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":29,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T10:28:19.408Z","stale":false,"partial":false}}