CVE-2026-0865
Rocky Linux vulnerability analysis and mitigation

Overview

CVE-2026-0865 is an HTTP header injection vulnerability in Python's wsgiref.headers.Headers class, caused by insufficient validation of user-controlled header names and values containing newline characters (C0 control characters). It affects CPython versions prior to 3.15.0 and was disclosed on January 20, 2026, by the Python Software Foundation (PSF). The vulnerability has a CVSS v4.0 base score of 5.9 (Medium), requiring high privileges and specific attack conditions (IBM Advisory, CPython Issue). Downstream IBM products including CICS Transaction Gateway for Multiplatforms and IBM Cloud Pak for Data System 1.0 are also affected (IBM Advisory).

Technical details

The root cause is improper neutralization of special elements in output used by a downstream component (CWE-74), specifically the failure of wsgiref.headers.Headers to reject C0 control characters (byte range 0x00–0x1F and 0x7F) in header names, values, and parameters. An attacker with the ability to influence header values passed to the Headers class can embed newline sequences (e.g., \r\n) to inject arbitrary HTTP headers into WSGI responses. The fix adds a regex check (_control_chars_re = re.compile(r'[\x00-\x1F\x7F]')) in the _convert_string_type method of Lib/wsgiref/headers.py, raising a ValueError when control characters are detected (CPython PR #143917, Commit 22e4d55). Exploitation requires that the attacker control data that is passed as a header name or value in a WSGI application using the vulnerable wsgiref module.

Impact

Successful exploitation allows an attacker to inject arbitrary HTTP headers into server responses, enabling attacks such as HTTP response splitting, cache poisoning, session fixation, and potential credential theft. The primary impact is on integrity (CVSS VI:H), with no direct confidentiality or availability impact. Applications using Python's wsgiref module that pass user-controlled data into HTTP response headers without additional sanitization are at risk, and the vulnerability could be leveraged to manipulate downstream clients or caching infrastructure (IBM Advisory, CPython Issue).

Exploitability

No public proof-of-concept exploit code or in-the-wild exploitation has been reported for CVE-2026-0865. The EPSS score is approximately 0.067%, indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires high privileges (PR:H) and specific attack conditions (AT:P), limiting the practical attack surface (IBM Advisory).

Exploitation steps

  1. Identify target: Locate a WSGI application built on Python's wsgiref module (versions < 3.15.0) that accepts user-controlled input and passes it as an HTTP response header name or value without sanitization.
  2. Craft malicious input: Prepare a payload containing a newline sequence (e.g., \r\n) embedded in a header value, such as legitimate-value\r\nInjected-Header: malicious.
  3. Trigger header injection: Submit the crafted input through an application endpoint that incorporates user data into a wsgiref.headers.Headers object (e.g., via a form field, URL parameter, or API request that is reflected in a response header).
  4. Achieve injection: The unpatched wsgiref module passes the value through without validation, causing the injected newline to split the HTTP response and insert the attacker-controlled header into the response sent to the client or intermediary cache.
  5. Exploit downstream effects: Use the injected header to perform cache poisoning, session fixation, or redirect attacks against users or caching proxies (CPython PR #143917, CPython Issue).

Indicators of compromise

  • Logs: HTTP response logs showing unexpected or duplicate headers in WSGI application responses; error logs showing ValueError: Control characters not allowed in headers after patching (indicating attempted exploitation).
  • Network: HTTP responses containing injected headers with unusual names or values; responses with unexpected \r\n sequences splitting header fields; anomalous Set-Cookie or Location headers not generated by application logic.
  • Application: WSGI application logs showing user-supplied data being passed directly to header construction functions without sanitization.

Mitigation and workarounds

The Python Software Foundation patched this vulnerability by adding C0 control character validation in Lib/wsgiref/headers.py. Fixes were backported to CPython branches 3.10, 3.11, 3.12, 3.13, and 3.14 (CPython PR #143917). Users should upgrade to a patched Python release (≥ 3.15.0 or a patched minor release for 3.10–3.14). As a workaround, applications should sanitize all user-controlled data before passing it to wsgiref.headers.Headers, explicitly rejecting any input containing characters in the range \x00–\x1F or \x7F. IBM has released patches for affected products including CICS Transaction Gateway for Multiplatforms and IBM Cloud Pak for Data System 1.0 (IBM Advisory, IBM Cloud Pak Advisory). Linux distributions including Red Hat, Ubuntu, Debian, SUSE, Fedora, and Amazon Linux have also issued updated packages.

Community reactions

The vulnerability was reported by Seth Michael Larson (PSF Security Developer-in-Residence) and fixed promptly with backports across all supported Python branches. The fix was announced via the Python security mailing list and coordinated with major Linux distributions, resulting in rapid patch availability across Red Hat, Ubuntu, Debian, SUSE, Fedora, AlmaLinux, Rocky Linux, and Amazon Linux. Community discussion was largely technical and focused on the backport process, with no significant controversy (Python Security Announce, oss-sec).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

python3.11: 3.11.2-6+deb12u7

Fixed

sid

python3.14: 3.14.3-1

Fixed

trixie

python3.13: 3.13.5-2+deb13u1

Fixed

Ubuntu

Fixed

bionic (esm-apps)

python3.7: 3.7.5-2ubuntu1~18.04.2+esm9

Fixed

bionic (esm-infra)

python2.7: 2.7.17-1~18.04ubuntu1.13+esm14

Fixed

devel

python3.14

Not Affected

focal (esm-apps)

python2.7: 2.7.18-1~20.04.7+esm9

Fixed

focal (esm-infra)

python3.8: 3.8.10-0ubuntu1~20.04.18+esm5

Fixed

jammy

python2.7

Affected

jammy (esm-apps)

python2.7: 2.7.18-13ubuntu1.5+esm8

Fixed

noble

python3.12: 3.12.3-1ubuntu0.11

Fixed

RHEL / CentOS

Fixed

RHEL 8

:appstream:python3-0:3.6.8-73.el8_10.src

Fixed

RHEL 9

:appstream:python3.11-0:3.11.7-1.el9_4.11.src

Fixed

RHEL 10

python3.12-0:3.12.12-3.el10_1.1.src

Fixed

SourceThis report was generated using AI

Related Rocky Linux vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-18922CRITICAL9.8
  • Rocky Linux logoRocky Linux
  • 389-ds-base-snmp-debuginfo
NoYesSep 07, 2026
CVE-2026-44950CRITICAL9.5
  • Rocky Linux logoRocky Linux
  • libXfont-debuginfo
NoYesSep 10, 2026
CVE-2026-59679CRITICAL9.2
  • Rocky Linux logoRocky Linux
  • libXfont2-doc
NoYesSep 10, 2026
CVE-2026-18453HIGH7.5
  • Rocky Linux logoRocky Linux
  • 389-ds:1.4::389-ds-base
NoYesSep 07, 2026
CVE-2026-18355HIGH7.5
  • Rocky Linux logoRocky Linux
  • 389-ds-base-snmp
NoYesSep 07, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management