---
id: CVE-2026-72848
title: >-
  SitemapLoader.parse_sitemap in langchain_community/document_loaders/sitemap.py
  applies the documented restrict_to_same_domain control only to leaf url
  entries
summary: >-
  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 …
severity: high
cvss: 8.6
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N'
cwe:
  - CWE-918
vendor: langchain-ai
product: langchain-community
affected:
  - langchain-community <= 0.4.2
published: '2026-08-20'
updated: '2026-09-24'
sourceUpdated: '2026-09-24T20:02:50.260'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-72848'
references:
  - url: 'https://github.com/langchain-ai/langchain-community'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/document_loaders/sitemap.py
    label: disclosure@vulncheck.com
  - url: 'https://github.com/langchain-ai/langchain/issues/38814'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/langchain-community-sitemaploader-does-not-apply-restrict-to-same-domain-to-nested-sitemap-index-entries-allowing-server-side-request-forgery
    label: disclosure@vulncheck.com
  - url: 'https://github.com/langchain-ai/langchain/issues/38814'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
  - cve.org
  - exploit-available
epss: 0.00604
epssPercentile: 0.46664
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-08-21T17:35:12.508114Z'
ingestedAt: '2026-09-24T15:45:56.712Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
