CVE-2026-72848

langchain-community SitemapLoader Does Not Apply restrict_to_same_domain to Nested Sitemap Index Entries, Allowing Server-Side Request Forgery

Published Aug 20, 2026 CVSS 4.0 · 7.7 High EPSS < 1% KEV · Not listed
Description
SitemapLoader.parse_sitemap in langchain_community/document_loaders/sitemap.py applies the documented restrict_to_same_domain control only to leaf url entries. The loop over url elements filters cross-domain locations, but the loop over nested sitemap elements passes the child loc straight to self.scrape_all([loc.text], "xml"), which reaches WebBaseLoader.scrape_all and an aiohttp GET, with no domain comparison and no check for private, loopback or link-local destinations. An attacker who controls or influences an ingested sitemap can therefore point a nested sitemap entry at an internal address and make the server fetch it even when the deploying application set restrict_to_same_domain to True specifically to confine outbound requests. The fetched content is parsed and surfaces in the returned Documents, so internal responses are disclosed to the caller rather than merely requested.

Analysis

AI-generated

Technical impact

This flaw is a CWE‑918 Server‑Side Request Forgery vulnerability. The vulnerable SitemapLoader applies the restrict_to_same_domain control only to direct URL entries and omits validation for nested sitemap references. As a result, an attacker who can influence the sitemap being processed can point a nested sitemap entry at an internal address. The loader fetches the specified internal resource without domain comparison, parses its contents, and returns the data as part of its output Documents, thereby disclosing internal responses to an external caller.

Affected Systems

The vulnerability impacts the Langchain Community library, specifically the SitemapLoader component within the langchain_community package. All releases of this library that expose the restrict_to_same_domain option are potentially affected; no specific version range is listed, so any deployment using the current library is at risk.

Risk and Exploitability

The flaw carries a CVSS score of 7.7, classifying it as a high severity Server‑Side Request Forgery. No EPSS score is available, and the vulnerability is not included in CISA's KEV catalog. The likely attack vector is inferred to be exploitation of a maliciously crafted sitemap; an attacker only needs control over the sitemap data that the application processes. If successful, the server will fetch the victim’s internal resources, parsing and delivering their content to the attacker in the form of Documents.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade langchain-community to a version that includes the patch for the SitemapLoader restrict_to_same_domain bug, as referenced in the issue tracker commit.
  • If an update is not immediately available, restrict outbound HTTP requests from the application to approved external domains and block internal IP ranges (private, loopback, link‑local) using network firewall rules.
  • Add an application‑level validation step to reject nested sitemap URLs that resolve to private or internal IP addresses until the official patch is applied.

Generated by OpenCVE AI on August 21, 2026 at 01:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:langchain:langchain_community:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Langchain
Langchain langchain Community
Vendors & Products Langchain
Langchain langchain Community
Type Values Removed Values Added
Description SitemapLoader.parse_sitemap in langchain_community/document_loaders/sitemap.py applies the documented restrict_to_same_domain control only to leaf url entries. The loop over url elements filters cross-domain locations, but the loop over nested sitemap elements passes the child loc straight to self.scrape_all([loc.text], "xml"), which reaches WebBaseLoader.scrape_all and an aiohttp GET, with no domain comparison and no check for private, loopback or link-local destinations. An attacker who controls or influences an ingested sitemap can therefore point a nested sitemap entry at an internal address and make the server fetch it even when the deploying application set restrict_to_same_domain to True specifically to confine outbound requests. The fetched content is parsed and surfaces in the returned Documents, so internal responses are disclosed to the caller rather than merely requested.
Title langchain-community SitemapLoader Does Not Apply restrict_to_same_domain to Nested Sitemap Index Entries, Allowing Server-Side Request Forgery
Weaknesses CWE-918
References
Metrics cvssV3_1

{'score': 8.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N'}

cvssV4_0

{'score': 7.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N'}

Weaknesses
  • CWE-918

    Server-Side Request Forgery (SSRF)

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 1, 2026, 3:20 PM
Reserved
Aug 10, 2026, 3:14 PM
Status
Awaiting Analysis
Published
Aug 20, 2026, 10:18 PM
Modified
Oct 18, 2026, 8:10 PM
Severity
Important
Public date
Aug 20, 2026, 9:57 PM