Skip to main content

LangChain Text Splitters CVE-2026-41481

| EUVDEUVD-2026-25634 MEDIUM
Server-Side Request Forgery (SSRF) (CWE-918)
2026-04-24 GitHub_M
6.5
CVSS 3.1 · Vendor: GitHub_M
Share

Severity by source

Vendor (GitHub_M) PRIMARY
6.5 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
vuln.today AI
5.3 MEDIUM

AC:H reflects the dual application-architecture prerequisite (attacker-controlled URL input AND Document content surfaced to requester); all other metrics align with the vendor vector.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

6
Source Code Evidence Fetched
Jul 24, 2026 - 02:19 vuln.today
Analysis Generated
Jul 24, 2026 - 02:19 vuln.today
Patch released
Apr 28, 2026 - 15:43 nvd
Patch available
Patch available
Apr 24, 2026 - 23:02 EUVD
EUVD ID Assigned
Apr 24, 2026 - 21:15 euvd
EUVD-2026-25634
CVE Published
Apr 24, 2026 - 20:54 nvd
MEDIUM 6.5

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1,653 pypi packages depend on langchain-text-splitters (402 direct, 1,291 indirect)

Ecosystem-wide dependent count for version 1.1.2.

DescriptionCVE.org

LangChain is a framework for building agents and LLM-powered applications. Prior to langchain-text-splitters 1.1.2, 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. This vulnerability is fixed in 1.1.2.

AnalysisAI

SSRF redirect bypass in langchain-text-splitters prior to 1.1.2 allows attackers who can supply URLs to applications using HTMLHeaderTextSplitter.split_text_from_url() to reach internal network endpoints, localhost services, or cloud instance metadata APIs by exploiting unvalidated HTTP redirects. The function's built-in validate_safe_url() check is circumvented because requests.get() follows 302 redirects by default without revalidating the redirect target - turning a deliberate safety feature into a false guarantee. Data exfiltration is contingent on the application returning or surfacing Document object contents to the URL-supplying party; no public exploit has been identified at time of analysis, and EPSS sits at the 9th percentile.

Technical ContextAI

The vulnerability resides in libs/text-splitters/langchain_text_splitters/html.py within the split_text_from_url() method of LangChain's HTMLHeaderTextSplitter class (CPE: cpe:2.3:a:langchain-ai:langchain-text-splitters:*:*:*:*:*:*:*:*). CWE-918 (Server-Side Request Forgery) describes the root cause: the server makes an HTTP request to a user-supplied URL without fully controlling the final destination. The architectural flaw is a classic TOCTOU-like pattern - validate_safe_url() confirms the original URL resolves to a non-private address, but the subsequent requests.get() call with follow_redirects=True (default) allows a redirect chain to terminate at any internal destination the attacker's server specifies. Cloud metadata endpoints requiring vendor-specific request headers (AWS IMDSv2, GCP, Azure IMDS) are explicitly not reachable through this bypass because the redirect response cannot inject the required headers; however, unauthenticated endpoints - notably AWS IMDSv1 and internal admin APIs - are exposed. The fix in version 1.1.2 requires langchain-core >= 1.2.31 and presumably revalidates the redirect target URL or disables redirect following entirely.

RemediationAI

Upgrade langchain-text-splitters to version 1.1.2 or later; this release also requires langchain-core >= 1.2.31, so both packages must be updated together. The fix is confirmed by the GitHub Security Advisory GHSA-fv5p-p927-qmxr at https://github.com/langchain-ai/langchain/security/advisories/GHSA-fv5p-p927-qmxr. If immediate upgrade is not possible, the most targeted compensating control is to avoid passing any externally-supplied or user-influenced URLs to split_text_from_url() - restrict input to a static allowlist of trusted domains resolved at application startup. Alternatively, wrap calls to split_text_from_url() with application-level redirect validation by setting allow_redirects=False in the underlying requests call and handling redirects manually with revalidation; however, this requires patching application code that calls the library rather than the library itself. Do not rely on network-layer blocks to internal subnets alone, as redirect targets may include cloud metadata endpoints reachable from any instance (e.g., 169.254.169.254 for AWS IMDSv1) that perimeter controls may not cover.

Vendor StatusVendor

Share

CVE-2026-41481 vulnerability details – vuln.today

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