Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-1502

CVE-2026-1502: HTTP Client Proxy Header Injection Flaw

CVE-2026-1502 is a header injection vulnerability where HTTP client proxy tunnels fail to reject CR/LF bytes in headers. This flaw enables request smuggling attacks. This article covers technical details, impact, and mitigation.

Published: April 17, 2026

CVE-2026-1502 Overview

CVE-2026-1502 is an HTTP Response Splitting vulnerability in Python's http.client module where CR/LF (Carriage Return/Line Feed) bytes were not properly rejected by HTTP client proxy tunnel headers or host parameters. This input validation flaw allows attackers to inject malicious header content when applications use Python's HTTP client for proxy tunnel connections.

Critical Impact

Attackers with privileged access can inject arbitrary HTTP headers through improperly validated tunnel host names or header values, potentially leading to HTTP response splitting, cache poisoning, or cross-site scripting attacks.

Affected Products

  • Python CPython (HTTP client library)
  • Applications using Python's http.client module for proxy tunneling
  • Systems utilizing Python's CONNECT proxy tunnel functionality

Discovery Timeline

  • 2026-04-10 - CVE CVE-2026-1502 published to NVD
  • 2026-04-13 - Last updated in NVD database

Technical Details for CVE-2026-1502

Vulnerability Analysis

The vulnerability exists in Python's http.client module, specifically in the _tunnel() method responsible for establishing HTTP proxy tunnel connections. When applications configure proxy tunneling via the set_tunnel() method, the tunnel host and custom headers were not validated for CR/LF control characters before being incorporated into the CONNECT request.

HTTP Response Splitting attacks exploit the fact that HTTP headers are delimited by CRLF sequences (\r\n). By injecting these control characters into header values or hostnames, an attacker can terminate the current header and inject arbitrary headers or even complete HTTP responses. This can lead to cache poisoning, session hijacking, or cross-site scripting depending on how intermediate proxies and caches handle the malformed responses.

The vulnerability requires privileged access and user interaction to exploit, as the attacker must control input that reaches the tunnel configuration. However, in scenarios where applications accept user-provided proxy configurations or tunnel headers, this flaw presents a significant injection risk.

Root Cause

The root cause is insufficient input validation in the _tunnel() method of Lib/http/client.py. Prior to the patch, the code directly encoded and concatenated tunnel headers without checking for illegal characters. The tunnel host was similarly not validated against the _contains_disallowed_url_pchar_re regex pattern that checks for control characters.

The header construction code previously used:

python
headers.append(f"{header}: {value}\r\n".encode("latin-1"))

This allowed header names and values containing CR/LF sequences to be passed through without rejection, enabling HTTP header injection.

Attack Vector

The attack is network-based and targets applications that allow external input to influence HTTP proxy tunnel configurations. An attacker with elevated privileges who can control tunnel header values or hostnames can inject CRLF sequences to:

  1. Terminate the current header prematurely
  2. Inject additional malicious headers
  3. Potentially inject a complete HTTP response body in cache poisoning scenarios

The following security patch demonstrates the fix implemented in Python's http.client module:

python
         return ip
 
     def _tunnel(self):
+        if _contains_disallowed_url_pchar_re.search(self._tunnel_host):
+            raise ValueError('Tunnel host can\'t contain control characters %r'
+                             % (self._tunnel_host,))
         connect = b"CONNECT %s:%d %s\r\n" % (
             self._wrap_ipv6(self._tunnel_host.encode("idna")),
             self._tunnel_port,
             self._http_vsn_str.encode("ascii"))
         headers = [connect]
         for header, value in self._tunnel_headers.items():
-            headers.append(f"{header}: {value}\r\n".encode("latin-1"))
+            header_bytes = header.encode("latin-1")
+            value_bytes = value.encode("latin-1")
+            if not _is_legal_header_name(header_bytes):
+                raise ValueError('Invalid header name %r' % (header_bytes,))
+            if _is_illegal_header_value(value_bytes):
+                raise ValueError('Invalid header value %r' % (value_bytes,))
+            headers.append(b"%s: %s\r\n" % (header_bytes, value_bytes))
         headers.append(b"\r\n")
         # Making a single send() call instead of one per line encourages
         # the host OS to use a more optimal packet size instead of

Source: GitHub Commit Security Update

Detection Methods for CVE-2026-1502

Indicators of Compromise

  • Unexpected CR (\r) or LF (\n) characters in HTTP proxy tunnel request logs
  • Malformed CONNECT requests in proxy server logs containing injected headers
  • Applications throwing ValueError exceptions after patching with messages about invalid header names or control characters

Detection Strategies

  • Monitor HTTP proxy logs for CONNECT requests containing unusual header patterns or multiple CRLF sequences
  • Implement input validation logging to detect attempts to pass control characters to set_tunnel() calls
  • Review application code for user-controlled input reaching HTTPConnection.set_tunnel() method calls
  • Deploy web application firewalls (WAF) rules to detect CRLF injection patterns in proxy configurations

Monitoring Recommendations

  • Enable verbose logging on proxy servers to capture full CONNECT request headers
  • Configure intrusion detection systems to alert on CRLF sequences in HTTP header values
  • Audit Python application dependencies to identify usage of vulnerable http.client proxy tunnel functionality

How to Mitigate CVE-2026-1502

Immediate Actions Required

  • Update Python to a patched version that includes the security fix from commit 05ed7ce7ae9e17c23a04085b2539fe6d6d3cef69
  • Review applications for usage of HTTPConnection.set_tunnel() with user-controlled input
  • Implement application-level input validation to reject CR/LF characters in any data passed to tunnel configurations
  • Consider using higher-level HTTP libraries with built-in header validation

Patch Information

The vulnerability has been addressed in Python CPython through the security patch referenced in GitHub Commit Security Update. The fix adds validation checks using _contains_disallowed_url_pchar_re, _is_legal_header_name(), and _is_illegal_header_value() functions to reject control characters before constructing tunnel requests.

For additional details, see the GitHub Issue Discussion, GitHub Pull Request Review, and the Python Security Announcement Thread.

Workarounds

  • Sanitize all user input before passing to set_tunnel() by stripping or rejecting CR/LF characters
  • Use allowlist validation for tunnel host names, permitting only expected hostname patterns
  • Implement strict header value validation at the application layer using regex patterns to reject control characters
bash
# Example Python input validation before calling set_tunnel()
# Add to application code as a workaround until patching is possible
import re

def validate_tunnel_input(value):
    if re.search(r'[\r\n]', value):
        raise ValueError(f"Invalid input: control characters detected")
    return value

# Usage: validate_tunnel_input(user_provided_host)

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechN/A

  • SeverityMEDIUM

  • CVSS Score5.7

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/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
  • IntegrityHigh
  • AvailabilityNone
  • Technical References
  • GitHub Commit Security Update

  • GitHub Issue Discussion

  • GitHub Pull Request Review

  • Python Security Announcement Thread

  • Openwall OSS-Security Bulletin
  • Latest CVEs
  • CVE-2025-11419: Keycloak TLS DoS Vulnerability

  • CVE-2025-13947: WebKitGTK Information Disclosure Flaw

  • CVE-2026-40322: SiYuan Knowledge Management RCE Vulnerability

  • CVE-2026-40318: SiYuan Path Traversal Vulnerability
Default Legacy - Prefooter | 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