Skip to content
Heist/ feed
High

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

Type: advisorySource: Official CVE List1 source record

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.

Announced Group revision 1
Original source ↗

CVE-2026-72848

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-72848

langchain-community

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://github.com/langchain-ai/langchain-community",
    "vendor": "langchain-ai",
    "product": "langchain-community",
    "versions": [
      {
        "status": "affected",
        "version": "0",
        "versionType": "semver",
        "lessThanOrEqual": "0.4.2"
      }
    ],
    "packageURL": "pkg:pypi/langchain-community",
    "packageName": "langchain-community",
    "programFiles": [
      "langchain_community/document_loaders/sitemap.py"
    ],
    "collectionURL": "https://pypi.org",
    "defaultStatus": "unaffected"
  }
]
Related CVEs
CVE-2026-72848

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#5471 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement