The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-0865

CVE-2026-0865: HTTP Header Injection XSS Vulnerability

CVE-2026-0865 is an XSS vulnerability allowing HTTP header injection through user-controlled header names and values with newlines. This article covers technical details, security impact, and mitigation strategies.

Published: January 23, 2026

CVE-2026-0865 Overview

CVE-2026-0865 is an HTTP Header Injection vulnerability affecting Python's wsgiref.headers.Headers module. User-controlled header names and values containing newlines can allow injecting HTTP headers, enabling attackers to manipulate HTTP responses and potentially conduct further attacks such as cache poisoning, session hijacking, or cross-site scripting through response splitting.

Critical Impact

Attackers with high privileges can inject arbitrary HTTP headers into responses by embedding newline characters in user-controlled header names or values, potentially compromising web application integrity.

Affected Products

  • Python CPython wsgiref.headers module (versions prior to security patches)
  • Applications using wsgiref for WSGI server implementations
  • Python web frameworks relying on wsgiref.headers.Headers for header manipulation

Discovery Timeline

  • 2026-01-20 - CVE CVE-2026-0865 published to NVD
  • 2026-01-20 - Last updated in NVD database

Technical Details for CVE-2026-0865

Vulnerability Analysis

This vulnerability is classified as CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component), commonly known as Injection. The flaw exists in Python's wsgiref.headers.Headers class, which failed to properly validate and sanitize control characters, particularly newline characters (\r\n), in HTTP header names and values.

HTTP header injection occurs when an attacker can insert newline characters into header fields. Since HTTP headers are delimited by CRLF (Carriage Return Line Feed) sequences, injecting these characters allows an attacker to terminate the current header and inject additional headers or even an entirely new HTTP response body. This technique is commonly referred to as HTTP Response Splitting.

The vulnerability requires network access and high privileges to exploit, with the primary impact being on the integrity of HTTP responses. While confidentiality and availability are not directly affected, the ability to inject arbitrary headers can lead to secondary attacks including cache poisoning, session fixation, and bypassing security headers.

Root Cause

The root cause of this vulnerability lies in insufficient input validation within the wsgiref.headers module. The module did not reject or sanitize control characters (ASCII characters 0x00-0x1F and 0x7F) when processing header names and values. This oversight allowed malicious input containing newline characters to pass through unchecked, enabling header injection attacks.

Attack Vector

The attack vector is network-based, requiring an attacker with elevated privileges to supply crafted input to an application that uses wsgiref.headers.Headers for HTTP header management. When the application constructs HTTP responses using user-supplied header names or values without proper sanitization, the attacker can inject newline characters to manipulate the response structure.

For example, an attacker could provide a header value containing \r\nX-Injected-Header: malicious-value which would result in an additional header being inserted into the HTTP response.

python
# Security patch in Lib/wsgiref/headers.py - Reject control characters
# Source: https://github.com/python/cpython/commit/22e4d55285cee52bc4dbe061324e5f30bd4dee58

# existence of which force quoting of the parameter value.
import re
tspecials = re.compile(r'[ \(\)<>@,;:\\"/\[\]\?=]')
+_control_chars_re = re.compile(r'[\\x00-\\x1F\\x7F]')

def _formatparam(param, value=None, quote=1):
    """Convenience function to format and return a key=value pair.

The patch introduces a new regular expression _control_chars_re that matches any control character in the ASCII range 0x00-0x1F and 0x7F, which are then rejected to prevent header injection attacks.

Detection Methods for CVE-2026-0865

Indicators of Compromise

  • Unusual HTTP headers appearing in application logs that were not explicitly set by application code
  • Presence of control characters or encoded newline sequences (%0d%0a, \r\n) in HTTP header values within web server access logs
  • Reports of unexpected cache behavior or session anomalies that could indicate header injection exploitation

Detection Strategies

  • Implement web application firewall (WAF) rules to detect and block requests containing newline characters or their encoded equivalents in header values
  • Monitor application logs for attempts to inject control characters into HTTP headers using pattern matching for \r, \n, %0d, %0a sequences
  • Deploy runtime application self-protection (RASP) solutions to detect header manipulation attempts at the application layer

Monitoring Recommendations

  • Enable verbose logging for web server and WSGI application components to capture full header information for forensic analysis
  • Configure security information and event management (SIEM) systems to alert on patterns consistent with HTTP response splitting attacks
  • Regularly audit applications using wsgiref to ensure they are running patched Python versions

How to Mitigate CVE-2026-0865

Immediate Actions Required

  • Upgrade Python to a patched version that includes the wsgiref.headers security fix
  • Review application code that handles user-supplied input for HTTP header construction and implement additional server-side validation
  • Deploy WAF rules as a temporary mitigation while preparing for patching

Patch Information

Security patches have been released across multiple Python branches. The fix introduces validation that rejects control characters in header names and values before they can be processed. Patches are available in the following commits:

  • Python 3.13 branch commit
  • Python 3.14 branch commit
  • Python 3.10 branch commit

Additional technical details are available in the GitHub Issue Discussion, GitHub Pull Request, and the Python Security Announcement.

Workarounds

  • Implement application-level input validation to strip or reject control characters from any user input that may be used in HTTP headers
  • Use a wrapper function around wsgiref.headers.Headers that validates header names and values before passing them to the underlying class
  • Consider using alternative WSGI implementations that include built-in protection against header injection
python
# Example: Input validation for header values before using wsgiref.headers
import re

def sanitize_header_value(value):
    """Reject header values containing control characters."""
    control_chars_re = re.compile(r'[\\x00-\\x1F\\x7F]')
    if control_chars_re.search(value):
        raise ValueError("Header value contains invalid control characters")
    return value

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechN/A

  • SeverityMEDIUM

  • CVSS Score5.9

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-74
  • Technical References
  • GitHub Commit Update

  • GitHub Commit Update

  • GitHub Commit Update

  • GitHub Commit Update

  • GitHub Commit Update

  • GitHub Commit Update

  • GitHub Issue Discussion

  • GitHub Pull Request Review

  • Python Security Announcement
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English