Skip to content
LangChainGHSA-3hjh-jh2h-vrg6

Denial of service in langchain-community

Medium4.2CVE-2024-2965 · Published Jun 6, 2024 · updated Jul 13, 2026

Denial of service in `SitemapLoader` Document Loader in the `langchain-community` package, affecting versions below 0.2.5. 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.

GitHub advisory

Affected versions

PackageAffectedFixed in
langchain
PyPI
< 0.2.50.2.5
langchain-community
PyPI
< 0.2.50.2.5
Details and references

More LangChain advisories

All LangChain
Advisory
langchain-experimental vulnerable to Arbitrary Code Execution
Critical8.5Jul 15, 2024
langchain_experimental Code Execution via Python REPL access
High7.8Jun 16, 2024
Server-Side Request Forgery in langchain-community.retrievers.web_research.WebResearchRetriever
Medium4.8Jun 6, 2024
langchain vulnerable to path traversal
Medium6.5Apr 16, 2024
LangChain's XMLOutputParser vulnerable to XML Entity Expansion
Medium5.9Mar 26, 2024
LangChain directory traversal vulnerability
LowMar 4, 2024

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.