CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-FV5P-P927-QMXR

GHSA-FV5P-P927-QMXR: SSRF via Redirect Bypass in LangChain HTMLHeaderTextSplitter

Alon Barad
Alon Barad
Software Engineer

Apr 17, 2026·6 min read·13 visits

Executive Summary (TL;DR)

LangChain's HTML text splitter fails to validate HTTP redirects during content retrieval, enabling attackers to bypass SSRF protections and extract internal network data or cloud IAM credentials.

The `langchain-text-splitters` package prior to version 0.3.5 is vulnerable to Server-Side Request Forgery (SSRF) in the `HTMLHeaderTextSplitter.split_text_from_url` method. The vulnerability arises from an incomplete validation mechanism that checks the initial URL but fails to restrict subsequent HTTP redirects, allowing an attacker to access restricted internal resources and cloud metadata services.

Vulnerability Overview

The langchain-text-splitters package, a component of the broader LangChain ecosystem, provides utilities for dividing text into smaller, semantically meaningful chunks. This functionality is required for processing large documents before embedding them into vector stores or feeding them to Large Language Models (LLMs). The HTMLHeaderTextSplitter class specifically targets HTML documents, parsing the Document Object Model (DOM) and splitting content based on header tags (<h1>, <h2>, etc.) to maintain logical structure.

A Server-Side Request Forgery (SSRF) vulnerability exists in the split_text_from_url method of this class. The flaw is tracked as GHSA-FV5P-P927-QMXR and carries a CVSS v3.1 score of 6.5. The vulnerability allows an attacker to bypass initial URL validation checks by leveraging HTTP redirects, forcing the server into making unauthorized requests to internal network resources.

The component attempts to restrict outbound requests to safe, public IP addresses to prevent SSRF. It implements a validation step that checks the user-supplied URL against a blocklist of restricted ranges, such as local loopback addresses and cloud metadata service IPs. However, this validation is performed only on the initial URL provided in the method invocation, failing to account for subsequent network routing events.

Root Cause Analysis

The root cause of this vulnerability lies in the implementation of the HTTP request lifecycle within the split_text_from_url method. When a user supplies a URL to this method, the underlying code executes a validation routine to ensure the destination is not a restricted or internal network address. If the URL passes this check, the method proceeds to fetch the content using an HTTP client.

The critical flaw is the failure to restrict or re-validate HTTP redirects. By default, standard HTTP clients automatically follow 3xx redirect status codes, such as 301 Moved Permanently or 302 Found. The underlying client transparently processes the Location header provided in the remote server's response and initiates a secondary request to the new destination.

Because the anti-SSRF validation logic only inspects the initial input string, it remains blind to any subsequent destinations introduced during the redirect chain. An attacker can supply a URL pointing to an external server they control. This server passes the initial validation but responds with a redirect pointing to a restricted internal IP address, circumventing the security control entirely.

Code Analysis

To understand the mechanical failure, we examine the sequence of operations in the vulnerable code path. The initial implementation performs a synchronous check on the URL string, verifying its host component against known restricted CIDR blocks. This logic correctly identifies and blocks explicit attempts to access addresses like 127.0.0.1 or 169.254.169.254.

# Conceptual representation of the vulnerable pattern
def split_text_from_url(url: str):
    if not is_safe_url(url):
        raise ValueError("Unsafe URL")
    
    # Flaw: The default HTTP client follows redirects without re-validation
    response = requests.get(url)
    return split_text(response.text)

The patch introduced in Pull Request #35960 addresses this discrepancy by hardening the anti-SSRF mechanisms. The fix modifies the request execution strategy to explicitly control redirect behavior. It disables automatic redirects or implements a custom redirect handler that recursively validates each hop in the redirect chain before proceeding.

# Conceptual representation of the patched pattern
def split_text_from_url(url: str):
    if not is_safe_url(url):
        raise ValueError("Unsafe URL")
    
    # Enforcing strict redirect validation or disabling auto-redirects
    response = requests.get(url, allow_redirects=False)
    if response.status_code in (301, 302, 303, 307, 308):
        # Handle redirect manually by re-verifying the Location header
        new_url = response.headers['Location']
        if not is_safe_url(new_url):
            raise ValueError("Unsafe redirect URL")
        response = requests.get(new_url, allow_redirects=False)
    
    return split_text(response.text)

Exploitation

Exploiting this SSRF vulnerability requires the attacker to control an external web server and pass its URL into an application utilizing the HTMLHeaderTextSplitter.split_text_from_url method. The attacker configures their server to respond to incoming HTTP GET requests with a 302 Found status code. The response includes a Location header pointing to the targeted internal resource.

When the vulnerable LangChain application processes the attacker's input, it first validates the external domain. Since the domain resolves to a public IP address, the validation check passes. The application then issues the GET request. The underlying HTTP library receives the 302 response and automatically issues a secondary request to the URL specified in the Location header.

The application retrieves the content from the internal resource, processes it through the HTML splitting logic, and incorporates the resulting text chunks into its normal execution flow. Depending on the application's design, this data may be reflected directly back to the attacker in an HTTP response, stored in a database, or processed by an LLM, making the exfiltrated data accessible to the attacker.

Impact Assessment

The primary impact of this vulnerability is the unauthorized disclosure of internal network configuration, local services, and sensitive credentials. The most critical risk surfaces when the vulnerable application is deployed in a cloud environment, such as AWS, Google Cloud Platform, or Microsoft Azure. Cloud providers utilize metadata services accessible via deterministic, non-routable IP addresses.

By targeting these metadata endpoints, an attacker extracts temporary Identity and Access Management (IAM) credentials, instance configuration details, and user-data scripts. If the IAM role attached to the computing instance possesses excessive privileges, the attacker leverages these credentials to pivot into the broader cloud environment, resulting in broader infrastructure compromise.

Beyond cloud metadata, the SSRF flaw enables an attacker to map the internal network architecture. They systematically probe local ports to identify services bound to 127.0.0.1 or scan adjacent internal subnets. Unauthenticated internal services, such as internal Redis databases, REST APIs, or administrative consoles, become reachable from the external attacker's perspective.

Remediation

The definitive remediation for this vulnerability is upgrading the langchain-text-splitters package to version 0.3.5 or later. This release incorporates the anti-SSRF hardening implemented in PR #35960. Development teams must audit their dependencies and verify that their Python environments execute the patched version.

In scenarios where immediate patching is not feasible, organizations must implement defense-in-depth measures at the network level. Configuring strict egress filtering on the host or container running the LangChain application restricts the impact. The egress firewall must deny all outbound traffic to 169.254.169.254 and block traffic to internal subnets (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) unless explicitly required by business logic.

Applications accepting arbitrary URLs for processing should implement defense-in-depth at the application layer. Utilizing dedicated proxy services designed to fetch external content safely prevents direct interaction with untrusted remote servers. These proxies enforce strict routing policies, deny redirects automatically, and strip sensitive headers.

Official Patches

LangChainfeat(core): harden anti-ssrf Pull Request

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Affected Systems

langchain-text-splitters

Affected Versions Detail

Product
Affected Versions
Fixed Version
langchain-text-splitters
LangChain
< 0.3.50.3.5
AttributeDetail
CWE IDCWE-918
Attack VectorNetwork
CVSS Score6.5
ImpactConfidentiality, Integrity
Exploit StatusProof-of-Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1552.005Cloud Instance Metadata API
Credential Access
CWE-918
Server-Side Request Forgery (SSRF)

The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

Vulnerability Timeline

Vulnerability Published
2024-10-24
Patch Released in version 0.3.5
2024-10-24

References & Sources

  • [1]GitHub Advisory: GHSA-FV5P-P927-QMXR
  • [2]LangChain Releases on GitHub
  • [3]OSV Entry for GHSA-FV5P-P927-QMXR
  • [4]AI Sec Watch Analysis

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•13 minutes ago•CVE-2026-56677
8.6

CVE-2026-56677: Unauthenticated Server-Side Request Forgery in 9Router OIDC Test Endpoint

A high-severity security vulnerability exists in 9Router, an AI router and token saver dashboard. When dashboard authentication features are disabled or left in default configurations, the application exposes administrative testing routines directly to the public internet. Unauthenticated network adversaries can exploit the OIDC configuration validation endpoint to initiate arbitrary HTTP requests, routing unauthorized traffic to local loops, adjacent container ports, and cloud resource metadata interfaces.

Amit Schendel
Amit Schendel
0 views•5 min read
•about 1 hour ago•CVE-2026-64849
9.3

CVE-2026-64849: Server-Side Request Forgery (SSRF) in MLflow Webhooks via DNS Rebinding

CVE-2026-64849 is a critical Server-Side Request Forgery (SSRF) vulnerability affecting MLflow tracking servers prior to version 3.15.0. It allows unauthenticated remote attackers to bypass outbound request destination filters using DNS rebinding or HTTP redirects. This exposure risks compromising sensitive cloud infrastructure metadata and internal microservices.

Alon Barad
Alon Barad
2 views•5 min read
•about 2 hours ago•CVE-2026-69146
6.5

CVE-2026-69146: Missing Authorization Bypass in MLflow Basic Authentication Middleware

This technical report details a missing authorization vulnerability (CVE-2026-69146 / GHSA-3p64-6gvh-82v5) affecting the MLflow platform from version 3.13.0 to 3.15.0. When MLflow is configured with the built-in basic-auth plugin, authenticated users can bypass run-level UPDATE authorization checks, enabling unauthorized dataset and model lineage metadata injection.

Alon Barad
Alon Barad
2 views•7 min read
•about 3 hours ago•CVE-2026-69148
7.1

CVE-2026-69148: Broken Object Level Authorization (BOLA) in MLflow Model Registry

MLflow prior to version 3.15.0 fails to perform proper authorization checks when registering model versions, allowing authenticated users with access to a registered model to link and access artifacts from runs and models belonging to other users without authorization.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 4 hours ago•CVE-2026-59893
7.5

CVE-2026-59893: Regular Expression Denial of Service in sqlparse Lexer

A high-severity Regular Expression Denial of Service (ReDoS) vulnerability in the sqlparse Python library prior to version 0.6.0 allows unauthenticated remote attackers to trigger CPU exhaustion and application denial of service via crafted SQL inputs containing unmatched dollar-quoted literals or unclosed multiline comments.

Alon Barad
Alon Barad
4 views•6 min read
•about 5 hours ago•GHSA-FHGH-WQ4Q-R37X
7.8

GHSA-FHGH-WQ4Q-R37X: Remote Code Execution via Sigstore Signature Verification Bypass in uniget CLI

A high-severity logic inversion flaw in the uniget CLI completely bypasses Sigstore cryptographic signature verification on metadata files by default. If an attacker can poison the package metadata cache or repository, they can execute arbitrary OS commands under the privileges of the active user.

Alon Barad
Alon Barad
5 views•5 min read