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
·
Updated

SitemapLoader.parsesitemap in langchaincommunity/documentloaders/sitemap.py applies the documented restricttosamedomain 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.scrapeall([loc.text], "xml"), which reaches WebBaseLoader.scrapeall 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 restricttosamedomain 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.

Affected Software

3 affected components
langchain_community/document_loaders/sitemap.py
WebBaseLoader
langchain_community SitemapLoader

Event History

Aug 20, 2026
CVE Published
via MITRE·09:57 PM
Data Sourced
via MITRE·09:57 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Is an application protected if it enables restrict_to_same_domain?

No. The restriction is applied to leaf URL entries but not to nested sitemap index entries, so a nested sitemap location can still cause an outbound fetch to another domain.

2

What does an attacker need to exploit this issue?

The attacker must control or influence a sitemap ingested by SitemapLoader and include a nested sitemap entry whose loc points to a target address. No authentication or user interaction is required to trigger the server-side request.

3

How can I determine whether a sitemap ingestion workflow is exposed?

Review sitemaps accepted by the application for nested sitemap loc values, especially values pointing outside the intended domain or at private, loopback, or link-local addresses. If SitemapLoader processes those nested entries, it passes them to WebBaseLoader for fetching without a domain or internal-address check.

4

What is exposed if the request succeeds?

The fetched nested sitemap content is parsed and returned in Documents. This can disclose internal HTTP responses to the caller, rather than only causing a blind request.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203