REDHAT-BUG-2461733: SSRF
LangChain is a framework for building agents and LLM-powered applications. Prior to langchain-text-splitters 1.1.2, HTMLHeaderTextSplitter.splittextfromurl() validated the initial URL using validatesafeurl() 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
langchain-text-splittersto a version that resolves this vulnerability.Fixed in 1.1.2
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2461733?
The severity of REDHAT-BUG-2461733 is high with a score of 7.
What type of vulnerability is REDHAT-BUG-2461733 classified as?
REDHAT-BUG-2461733 is classified as a Server-Side Request Forgery (SSRF) vulnerability.
How do I fix REDHAT-BUG-2461733?
To fix REDHAT-BUG-2461733, upgrade to langchain-text-splitters version 1.1.2 or later.
What is the impact of REDHAT-BUG-2461733?
The impact of REDHAT-BUG-2461733 can allow an attacker to exploit the application by targeting internal services.
Is REDHAT-BUG-2461733 present in older versions of langchain-text-splitters?
Yes, REDHAT-BUG-2461733 is present in versions prior to langchain-text-splitters 1.1.2.