mediumCVSS 6.5Vulnerability

GHSA-fv5p-p927-qmxr

## Summary `HTMLHeaderTextSplitter.split_text_from_url()` validated the initial URL using `validate_safe_url()` but then performed the fetch with `requests.get()` with redirects enabled (the default). Because redirect targets were not revalidated, a URL pointing to an attacker-controlled server could redirect to internal, localhost, or cloud metadata endpoints, bypassing SSRF protections. The response body is parsed and returned as `Document` objects to the calling application code. Whether this constitutes a data exfiltration path depends on the application: if it exposes Document contents (or derivatives) back to the requester who supplied the URL, sensitive data from internal endpoints could be leaked. Applications that store or process Documents internally without returning raw content to the requester are not directly exposed to data exfiltration through this issue. ## Affected versions - `langchain-text-splitters` < 1.1.2 ## Patched versions - `langchain-text-splitters` >= 1.1.2 (requires `langchain-core` >= 1.2.31) ## Affected code **File:** `libs/text-splitters/langchain_text_splitters/html.py` — `split_text_from_url()` The vulnerable pattern validated the URL once then fetched with redirects enabled: ```python validate_safe_url(url, allow_private=False, allow_http=True) response = requests.get(url, timeout=timeout, **kwargs) ``` ## Attack scenario 1. A developer passes external URLs to `split_text_from_url()`, relying on its built-in `validate_safe_url()` check to block requests to internal networks. 2. An attacker supplies a URL pointing to a public host they control. The URL passes `validate_safe_url()` (public hostname, public IP). 3. The attacker's server responds with a `302` redirect to an internal endpoint (e.g., an unauthenticated internal admin API, or a cloud instance metadata service that does not require request headers — such as AWS IMDSv1). 4. `requests.get()` follows the redirect automatically. The redirect target is

Properties

ghsa_id
GHSA-fv5p-p927-qmxr
severity
medium
summary
LangChain Text Splitters: HTMLHeaderTextSplitter.split_text_from_url SSRF Redirect Bypass
cvss_score
6.5
cve_id
GHSA-fv5p-p927-qmxr
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
is_ghsa_only
true
ghsa_published
2026-04-16T22:53:32Z
source_url
https://github.com/advisories/GHSA-fv5p-p927-qmxr
ghsa_updated
2026-04-16T22:53:33Z

Related Entities (4)

VULNERABLE_TO (1)

[Software]pip/langchain-text-splitters

AFFECTS (1)

[Software]pip/langchain-text-splitters

HAS_WEAKNESS (1)

[Weakness]Server-Side Request Forgery (SSRF)

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-fv5p-p927-qmxr (CVSS 6.5) — Ninja Signal Threat Intelligence | Ninja Signal