CVE-2026-41481: CWE-918: Server-Side Request Forgery (SSRF) in langchain-ai langchain-text-splitters
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.
AI Analysis
Technical Summary
The vulnerability exists in the HTMLHeaderTextSplitter.split_text_from_url() function of langchain-text-splitters before version 1.1.2. Although the initial URL is validated with validate_safe_url(), the HTTP fetch uses requests.get() with redirects enabled by default, and redirect targets are not revalidated. This allows an attacker-controlled URL to redirect to internal, localhost, or cloud metadata endpoints, bypassing SSRF protections. The fetched response body is parsed into Document objects and returned to the application. If the application exposes these Document contents back to the requester, sensitive internal data could be leaked. Applications that do not expose raw Document content to the requester are not directly vulnerable to data exfiltration via this issue. The vulnerability is addressed in langchain-text-splitters version 1.1.2.
Potential Impact
An attacker can exploit this SSRF vulnerability to cause the application to make HTTP requests to internal or cloud metadata endpoints by leveraging unvalidated redirects. This can lead to unauthorized disclosure of sensitive internal information if the application returns the fetched Document content to the requester. There is no indication of integrity or availability impact. The severity is rated medium with a CVSS score of 6.5.
Mitigation Recommendations
This vulnerability is fixed in langchain-text-splitters version 1.1.2. Users should upgrade to version 1.1.2 or later to remediate the issue. No other official remediation level or temporary fix is indicated. Applications that do not expose Document contents back to requesters are not directly exposed to data exfiltration from this vulnerability.
CVE-2026-41481: CWE-918: Server-Side Request Forgery (SSRF) in langchain-ai langchain-text-splitters
Description
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the HTMLHeaderTextSplitter.split_text_from_url() function of langchain-text-splitters before version 1.1.2. Although the initial URL is validated with validate_safe_url(), the HTTP fetch uses requests.get() with redirects enabled by default, and redirect targets are not revalidated. This allows an attacker-controlled URL to redirect to internal, localhost, or cloud metadata endpoints, bypassing SSRF protections. The fetched response body is parsed into Document objects and returned to the application. If the application exposes these Document contents back to the requester, sensitive internal data could be leaked. Applications that do not expose raw Document content to the requester are not directly vulnerable to data exfiltration via this issue. The vulnerability is addressed in langchain-text-splitters version 1.1.2.
Potential Impact
An attacker can exploit this SSRF vulnerability to cause the application to make HTTP requests to internal or cloud metadata endpoints by leveraging unvalidated redirects. This can lead to unauthorized disclosure of sensitive internal information if the application returns the fetched Document content to the requester. There is no indication of integrity or availability impact. The severity is rated medium with a CVSS score of 6.5.
Mitigation Recommendations
This vulnerability is fixed in langchain-text-splitters version 1.1.2. Users should upgrade to version 1.1.2 or later to remediate the issue. No other official remediation level or temporary fix is indicated. Applications that do not expose Document contents back to requesters are not directly exposed to data exfiltration from this vulnerability.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-20T16:14:19.006Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69ebdedf87115cfb68748361
Added to database: 4/24/2026, 9:21:35 PM
Last enriched: 4/24/2026, 9:36:20 PM
Last updated: 4/24/2026, 11:31:16 PM
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.