Skip to main content

LangChain Community CVE-2026-72848

| EUVDEUVD-2026-63732 HIGH
Server-Side Request Forgery (SSRF) (CWE-918)
2026-08-20 disclosure@vulncheck.com GHSA-vg8m-4p2q-gcjh
7.7
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker controls external sitemap source
  2. Delivery
    Embed nested <sitemap> entry with internal address as <loc>
  3. Exploit
    Application invokes SitemapLoader on attacker-influenced sitemap
  4. Install
    Nested entry bypasses restrict_to_same_domain check
  5. C2
    aiohttp issues unauthenticated GET to internal address
  6. Execute
    Internal HTTP response parsed into Document objects
  7. Impact
    Caller receives disclosed internal content

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The application must be using SitemapLoader from the langchain-community package to ingest sitemaps. The attacker must control or influence the content of a sitemap consumed by that application - this is satisfied when the pipeline accepts user-supplied sitemap URLs, crawls external websites, or loads sitemaps from third-party sources the attacker can modify or poison. The target sitemap must use the sitemap index format containing nested <sitemap> elements (rather than a flat <url> list), because the bypass exclusively affects the nested-entry processing loop. The deploying application must have set restrict_to_same_domain=True - if that flag is absent, no bypass occurs because no restriction was applied in the first place. Exploitation yields meaningful data only if the LangChain server has network-level access to internal resources (cloud metadata endpoints, intranet APIs, internal services); a fully network-isolated deployment would receive empty or refused responses. PR:N in the CVSS 4.0 vector confirms no authentication to the LangChain host is required. No special software version, operating system, or non-default runtime configuration beyond the above is needed.

Impact

The 7.7 CVSS 4.0 score is driven entirely by SC:H - the vulnerable system (the LangChain process) shows no self-impact (VC/VI/VA all N), accurately modelling SSRF: the application is co-opted as a proxy, with internal services as the actual disclosure targets. The attack vector is Network with no complexity, privilege, or interaction requirements, meaning every deployment ingesting attacker-influenced sitemaps is exposed without authentication. EPSS data was not supplied in the available intelligence; however, the combination of a straightforwardly reproducible bypass of a documented security control, the popularity of LangChain in production RAG and content-ingestion pipelines, and zero CVSS mitigating conditions suggests non-trivial exploitation probability in targeted attacks. The vulnerability is not listed in CISA KEV and no public exploit code has been confirmed, which distinguishes it from immediately weaponized threats - but the absence of KEV listing should not reduce urgency for teams running LangChain pipelines against third-party sitemaps. A CVSS 3.1 mapping of approximately 8.6 (S:C, C:H, I:N, A:N) is consistent with the 4.0 rating; no conflict between the two scoring systems was observed. This is a real priority for affected deployments, not a high-CVSS-but-low-real-risk issue: the code path is explicit, the bypass of an intentional control is confirmed, and cloud metadata endpoints (e.g., 169.254.169.254) are a proven SSRF target class.

Exploit ScenarioDerived

An attacker who controls or has compromised a public website hosts a sitemap index file containing a nested <sitemap><loc>http://169.254.169.254/latest/meta-data/</loc></sitemap> entry pointing at the cloud instance metadata endpoint. When a LangChain RAG pipeline with restrict_to_same_domain=True processes this sitemap, the nested entry skips domain validation, triggering an aiohttp GET to the metadata endpoint; the response - potentially containing IAM credentials or instance identity documents - is deserialized and returned inside the pipeline's Document objects, disclosing it to whoever invoked the ingestion job. No public exploit code has been confirmed, but the attack path is directly derivable from the vulnerability description without additional reverse engineering.

Monitor Track and reassess. Why: Vendor states no customer action required.
No patch listed yet 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 20, 2026

SSRF in langchain-community's SitemapLoader defeats the documented restrict_to_same_domain security control by failing to apply it to nested sitemap index entries, allowing an attacker who influences an ingested sitemap to exfiltrate responses from internal network resources including loopback, link-local, and RFC-1918 addresses. Any LangChain-based pipeline consuming attacker-influenced sitemaps is affected; the CVSS 4.0 score of 7.7 reflects high confidentiality impact on downstream internal systems (SC:H) with no authentication or complexity requirements. No public exploit code has been confirmed and the flaw is not listed in CISA KEV at time of analysis, though the attack path is directly derivable from the vulnerability description.

RemediationAI

Upgrade langchain-community to a patched release as the primary fix; monitor the upstream repository at https://github.com/langchain-ai/langchain-community and the tracking issue at https://github.com/langchain-ai/langchain/issues/38814 for a confirmed fix version - no specific patched release has been independently verified at time of analysis, and the VulnCheck advisory at 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 should be monitored for updates. As an immediate compensating control, restrict SitemapLoader inputs to a hardcoded allowlist of trusted sitemap URLs validated before ingestion, eliminating the attacker-influence prerequisite entirely; the trade-off is reduced pipeline flexibility. If dynamic sitemap sources are required, implement server-side egress filtering - reject RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback (127.0.0.0/8), and link-local (169.254.0.0/16) at the network or application layer before any outbound request is made. Do not rely on restrict_to_same_domain=True as a security boundary for nested sitemap entries: the vulnerability description confirms this control is explicitly bypassed for that code path.

Affected VersionsENISA

langchain-community 0 ≤0.4.2

Affected Packages

euvd langchain_community no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause (CWE-918, Server-Side Request Forgery) lives in SitemapLoader.parse_sitemap() within langchain_community/document_loaders/sitemap.py. The Sitemaps protocol supports two document types: flat URL lists (<url> elements) and sitemap index files (<sitemap> elements that reference child sitemaps). The code correctly filters <url> leaf entries against the origin domain when restrict_to_same_domain=True, but the parallel loop over <sitemap> index entries passes each child <loc> text value directly to self.scrape_all([loc.text], 'xml') - skipping the domain comparison entirely. That call propagates to WebBaseLoader.scrape_all, which issues an aiohttp HTTP GET with no validation of private ranges (RFC 1918), loopback (127.0.0.0/8), or link-local (169.254.0.0/16) addresses. Critically, the fetched content is parsed and returned as Document objects to the caller, meaning internal responses are not merely requested - they are disclosed. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms zero-friction network exploitation; SC:H captures that the confidentiality breach affects subsequent internal systems rather than the LangChain host itself.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (vulncheck) PRIMARY 7.7 HIGH
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
vuln.today AI 8.6 HIGH

Network vector with no privileges needed; scope changed because internal systems are the disclosure targets, not the LangChain host; no integrity or availability impact observed.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N
Red Hat 8.6 HIGH

Primary rating from Vendor (vulncheck).

CVSS VectorVendor: vulncheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Organizations using LangChain-based document processing pipelines face remote data exfiltration risks through an unpatched SitemapLoader component, which fails to enforce documented security controls on nested sitemap entries. This vulnerability enables attackers to access sensitive internal resources including databases, credentials, and system information with high confidentiality impact. This is critical for enterprises consuming external or user-supplied sitemaps in production AI/ML pipelines.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include: network segmentation restricting outbound access from LangChain processes to internal networks (RFC-1918, link-local, loopback ranges); strict URL allow-listing for external sitemap sources; disabling external sitemap ingestion if operationally feasible; and source code audit of any custom SitemapLoader subclasses to verify restrict_to_same_domain is enforced at all sitemap nesting levels. Monitor vendor security advisories for patch availability and deploy immediately upon release.

Threat Intelligence Overview

EPSS Score
0.5%
Top 61% exploitable
Prevalence
Medium
popular Python AI/ML library, widely used in enterprise RAG pipelines
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
Vendor states no customer action required
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy