CVE-2026-0865

wsgiref.headers.Headers allows header newline injection

Published Jan 20, 2026 CVSS 4.0 · 5.9 Medium EPSS < 1% KEV · Not listed
Description
User-controlled header names and values containing newlines can allow injecting HTTP headers.

Analysis

AI-generated

Technical impact

User-controlled HTTP header names or values that include newline characters can be used to inject additional headers into the response. This header injection vulnerability may enable attackers to modify or add HTTP headers, potentially leading to HTTP response splitting, cache poisoning, or application logic manipulation. The flaw originates from the lack of sanitization in Python's wsgiref.headers module and is classified as a Header Injection weakness (CWE‑74).

Affected Systems

The vulnerability affects the CPython implementation of the Python Software Foundation. Any deployment that employs the wsgiref.headers class without the patch—primarily Python web servers or applications that use the wsgiref module—is potentially impacted. Affected version details were not disclosed in the provided data.

Risk and Exploitability

The CVSS score of 5.9 indicates a moderate impact, while an EPSS score of less than 1% suggests a low exploitation probability at this time. The issue does not appear in the CISA KEV catalog, implying no confirmed widespread exploitation. The likely attack vector is remote, via an HTTP request constructed by an attacker that includes newlines in header names or values processed by wsgiref.headers. An attacker could construct such a request to influence the server's response headers before application logic is applied.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade CPython to the latest stable release that incorporates the wsgiref header sanitization change.
  • If an immediate upgrade is not possible, validate and sanitize all incoming HTTP headers for newline characters before they reach the wsgiref module, or handle headers at the application layer to prevent injection.
  • Consider disabling or replacing the use of wsgiref.headers in production code, or using a third-party WSGI server with stricter header validation.

Generated by OpenCVE AI on April 16, 2026 at 18:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4455-1 python3.9 security update
Ubuntu USN Ubuntu USN USN-8018-1 Python vulnerabilities
Ubuntu USN Ubuntu USN USN-8018-2 Python regression
Ubuntu USN Ubuntu USN USN-8018-3 Python 2.7 vulnerabilities
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Python
Python cpython
Vendors & Products Python
Python cpython
Type Values Removed Values Added
Description User-controlled header names and values containing newlines can allow injecting HTTP headers.
Title wsgiref.headers.Headers allows header newline injection
Weaknesses CWE-74
References
Metrics cvssV4_0

{'score': 5.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Sources

Status
PUBLISHED
Assigner
PSF
Published
Updated
Mar 3, 2026, 2:43 PM
Reserved
Jan 12, 2026, 4:07 PM
Status
Deferred
Published
Jan 20, 2026, 10:15 PM
Modified
Jun 17, 2026, 10:11 AM
Severity
Moderate
Public date
Jan 20, 2026, 9:26 PM