CVE-2025-57804: H2 H2 Allows HTTP Request Smuggling Vulnerability

MODERATE
Advisory Identifier: GHSA-847f-9342-265h
CWE-93
Published
Advisory Summary

CVE-2025-57804 is a MODERATE h2 allows http request smuggling vulnerability (CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')) affecting H2 libraries in the PyPI ecosystem. The issue involves h2 allows http request smuggling due to illegal characters in headers. Remediation is available by upgrading affected packages to version 4.3.0.

CVE-2025-57804 at a Glance

CVE Identifier CVE-2025-57804
GHSA Identifier GHSA-847f-9342-265h
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')
Affected Product H2
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-57804

To remediate this vulnerability, upgrade all affected H2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

h2 fixed: 4.3.0
pip install h2>=4.3.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show h2

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-57804, inspect your installed packages using pip:

pip show h2

Analyze the terminal output to locate any version of H2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.3.0), your application is affected.

Note: The pip show h2 command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection'), where the product uses crlf (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes crlf sequences from inputs. In H2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary HTTP/2 request splitting vulnerability allows attackers to perform request smuggling attacks by injecting CRLF characters into headers. This occurs when servers downgrade HTTP/2 requests to HTTP/1.1 without properly validating header names/values, enabling attackers to manipulate request boundaries and bypass security controls.

CVE-2025-57804 Affected H2 Versions

1 component(s)
Fixed Versions:
4.3.0
Product / Package Ecosystem Affected Versions Fixed Version
h2
PyPI
< 4.3.0
4.3.0

References

Frequently Asked Questions

What is CVE-2025-57804?
CVE-2025-57804 is a security vulnerability in H2 involving h2 allows HTTP Request Smuggling due to illegal characters in headers under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection').
Which H2 versions are affected?
Affected versions include releases prior to 4.3.0 across affected packages: h2.
What version fixes CVE-2025-57804?
Upgrading to 4.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is h2 affected?
Yes, h2 is affected in releases prior to 4.3.0. Upgrade your dependency to 4.3.0 or later.
What CWE is associated with CVE-2025-57804?
CVE-2025-57804 is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') (The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.).
How can I check PyPI dependencies for CVE-2025-57804?
Run the dependency tree command: 'pip show h2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-847f-9342-265h",
  "modified" : "2025-11-03T21:34:24Z",
  "published" : "2025-08-25T20:44:43Z",
  "aliases" : [ "CVE-2025-57804" ],
  "summary" : "h2 allows HTTP Request Smuggling due to illegal characters in headers",
  "details" : "### Summary\n\nHTTP/2 request splitting vulnerability allows attackers to perform request smuggling attacks by injecting CRLF characters into headers. This occurs when servers downgrade HTTP/2 requests to HTTP/1.1 without properly validating header names/values, enabling attackers to manipulate request boundaries and bypass security controls.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "h2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/python-hyper/h2/security/advisories/GHSA-847f-9342-265h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-57804"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-hyper/h2/commit/035e9899f95e3709af098f578bfc3cd302298e3a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/python-hyper/h2"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/09/msg00004.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-93" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-25T20:44:43Z",
    "nvd_published_at" : "2025-08-25T21:15:37Z"
  }
}