CVE-2026-72848
JSON

7.7high

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

Severity
7.7high CVSS:4.0 by VulnCheck
Exploit likelihood
0.60% (higher than 50% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck

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.

Affected

Product or packageVersionsReported by
langchain-communityup to 0.4.2CVE List

All scores

VulnCheck8.6high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
VulnCheck7.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N

Classification

CWE-918

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

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.

NVD (es)

SitemapLoader.parse_sitemap en langchain_community/document_loaders/sitemap.py aplica el control documentado restrict_to_same_domain solo a las entradas de URL hoja. El bucle sobre los elementos de URL filtra las ubicaciones de dominio cruzado, pero el bucle sobre los elementos de sitemap anidados pasa el loc hijo directamente a self.scrape_all([loc.text], 'xml'), lo que llega a WebBaseLoader.scrape_all y a una solicitud GET de aiohttp, sin comparación de dominio y sin verificación de destinos privados, de bucle invertido o de enlace local. Un atacante que controla o influye en un sitemap ingerido puede, por lo tanto, apuntar una entrada de sitemap anidado a una dirección interna y hacer que el servidor la obtenga incluso cuando la aplicación de despliegue configuró restrict_to_same_domain como True específicamente para confinar las solicitudes salientes. El contenido obtenido es analizado y aparece en los Documentos devueltos, por lo que las respuestas internas se divulgan al llamador en lugar de simplemente ser solicitadas.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-72848 changed 2026-10-01CVE Terms of Use
NVDCVE-2026-72848 changed 2026-10-18Public domain