CVE-2026-44546

Header injection via WebSocket upgrade parser differential allows ASGI scope header spoofing

Published Jun 3, 2026 CVSS 3.1 · 3.7 Low EPSS < 1% KEV · Not listed
Description
daphne before 4.2.2 reconstructs a raw HTTP request from Twisted's parsed headers and feeds it to autobahn for WebSocket handshake processing. Twisted does not treat \x0b, \x0c, \x1c, \x1d, \x1e, or \x85 as header line separators, but autobahn decodes header values to str and calls splitlines(). An attacker can exploit this parser differential to inject additional headers into the ASGI scope passed to the application. daphne now rejects requests with these bytes in any header value with a 400 response.

Analysis

AI-generated

Technical impact

daphne before version 4.2.2 reconstructs a raw HTTP request from Twisted’s parsed headers and passes it to autobahn for WebSocket handshake processing. Twisted does not treat specific control bytes (\x0b, \x0c, \x1c, \x1d, \x1e, \x85) as header line separators, while autobahn splits header values on line boundaries. An attacker can therefore inject additional header lines by including these bytes in a WebSocket upgrade request, causing the ASGI application to receive a forged request scope with altered headers. This flaw enables header spoofing and could lead to misrepresentation of client information, potentially undermining application logic that relies on trusted header values.

Affected Systems

djangoproject:daphne versions earlier than 4.2.2 are affected. The 4.2.2 release explicitly rejects any request containing the listed control bytes in header values and returns a 400 Bad Request response, addressing the vulnerability.

Risk and Exploitability

The CVSS score of 3.7 indicates a moderate impact. The EPSS score is not available, so the current exploitation likelihood cannot be quantified, and the vulnerability is not listed in CISA’s KEV catalog, suggesting no known widespread exploitation. The attack vector is remote over the network; an attacker only needs the ability to send a crafted WebSocket upgrade request. While the flaw does not provide direct remote code execution, it allows an attacker to inject or spoof headers, which could be leveraged if the application blindly trusts header values for authorization or other security decisions.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade daphne to version 4.2.2 or later to eliminate the parser differential and disable header injection.
  • If upgrading immediately is not possible, configure upstream proxies or load balancers to reject any WebSocket upgrade request that contains the bytes \x0b, \x0c, \x1c, \x1d, \x1e, or \x85 in HTTP header values, thereby preventing forged headers from reaching the application.
  • Review application code that consumes ASGI scope headers to ensure it validates or sanitizes header values before use, mitigating the impact of any accidental header injection that might bypass the library fix.

Generated by OpenCVE AI on June 3, 2026 at 15:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-xh68-hfp5-5x5m daphne: WebSocket handshake header smuggling through autobahn splitlines() mishandling of non-standard line separators
History
Type Values Removed Values Added
CPEs cpe:2.3:a:djangoproject:daphne:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Djangoproject
Djangoproject daphne
Vendors & Products Djangoproject
Djangoproject daphne
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description daphne before 4.2.2 reconstructs a raw HTTP request from Twisted's parsed headers and feeds it to autobahn for WebSocket handshake processing. Twisted does not treat \x0b, \x0c, \x1c, \x1d, \x1e, or \x85 as header line separators, but autobahn decodes header values to str and calls splitlines(). An attacker can exploit this parser differential to inject additional headers into the ASGI scope passed to the application. daphne now rejects requests with these bytes in any header value with a 400 response.
Title Header injection via WebSocket upgrade parser differential allows ASGI scope header spoofing
Weaknesses CWE-444
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N'}

Weaknesses
  • CWE-444

    Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')

Sources

Status
PUBLISHED
Assigner
DSF
Published
Updated
Jun 3, 2026, 3:46 PM
Reserved
May 6, 2026, 8:29 PM
Status
Analyzed
Published
Jun 3, 2026, 2:16 PM
Modified
Jul 22, 2026, 7:10 PM
Severity
Low
Public date
Jun 3, 2026, 1:17 PM