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-2020-26116

CVE-2020-26116: Python HTTP Client CRLF Injection Flaw

CVE-2020-26116 is a CRLF injection vulnerability in Python's http.client module that allows attackers to inject malicious headers. This article covers technical details, affected Python versions, and mitigation strategies.

Published: March 4, 2026

CVE-2020-26116 Overview

CVE-2020-26116 is a CRLF injection vulnerability in Python's http.client module that allows attackers to inject arbitrary HTTP headers when they control the HTTP request method. The vulnerability exists in Python 3.x versions before 3.5.10, 3.6.x before 3.6.12, 3.7.x before 3.7.9, and 3.8.x before 3.8.5. By inserting carriage return (CR) and line feed (LF) control characters in the first argument of HTTPConnection.request(), attackers can manipulate HTTP requests to perform HTTP header injection attacks.

Critical Impact

Attackers can inject malicious HTTP headers, potentially enabling request smuggling, cache poisoning, or session hijacking attacks against applications using vulnerable Python versions.

Affected Products

  • Python 3.x before 3.5.10, 3.6.x before 3.6.12, 3.7.x before 3.7.9, 3.8.x before 3.8.5
  • Fedora 31, 32, 33
  • Canonical Ubuntu Linux 12.04, 14.04 ESM, 16.04 ESM, 18.04 LTS
  • NetApp SolidFire, HCI Compute Node, HCI Storage Node
  • Debian Linux 9.0
  • Oracle ZFS Storage Appliance Kit 8.8
  • openSUSE Leap 15.1

Discovery Timeline

  • 2020-09-27 - CVE-2020-26116 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-26116

Vulnerability Analysis

The vulnerability resides in Python's http.client module, which is part of the standard library used extensively for making HTTP requests. The core issue is that the module fails to properly validate and sanitize the HTTP method parameter passed to the HTTPConnection.request() function. HTTP methods should consist only of valid token characters, but the vulnerable implementation allows CR (\r) and LF (\n) control characters to pass through without rejection.

When these CRLF sequences are present in the method parameter, they are interpreted by HTTP servers as header delimiters, allowing an attacker to inject additional HTTP headers or even craft entirely separate HTTP requests. This weakness is classified under CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component), commonly known as an injection vulnerability.

Root Cause

The root cause is insufficient input validation in the HTTPConnection.request() method. The implementation does not verify that the HTTP method argument contains only permitted characters as defined by RFC 7230. Specifically, HTTP token characters should not include control characters like CR and LF. The absence of this validation allows attackers who can influence the method parameter to break out of the expected HTTP structure and inject arbitrary content into the request.

Attack Vector

The attack is network-based and requires no authentication or user interaction. An attacker must be able to control or influence the HTTP request method parameter in a Python application. This commonly occurs in scenarios where:

  • Applications dynamically construct HTTP methods based on user input
  • Web applications proxy or forward requests with user-controlled parameters
  • APIs accept method specifications from external sources

When exploited, the attacker injects CRLF characters followed by malicious headers. For example, passing a method like GET / HTTP/1.1\r\nX-Injected: malicious\r\n\r\nGET would cause the Python HTTP client to send what appears to be two separate requests, potentially poisoning caches, hijacking sessions, or bypassing security controls.

The vulnerability is exploited by crafting a malicious method string containing CRLF sequences followed by the desired injected headers. When the application passes this to HTTPConnection.request(), the injected content becomes part of the raw HTTP request sent to the server. For detailed technical analysis, refer to the Python Security Vulnerability Documentation.

Detection Methods for CVE-2020-26116

Indicators of Compromise

  • Unusual HTTP request patterns in web server logs containing unexpected method names with special characters
  • HTTP requests with method fields containing %0d%0a (URL-encoded CRLF) or raw CRLF sequences
  • Application logs showing HTTP client errors related to malformed requests
  • Evidence of HTTP response splitting or cache poisoning attacks targeting Python-based services

Detection Strategies

  • Implement web application firewall (WAF) rules to detect CRLF sequences in HTTP method fields
  • Monitor application logs for HTTP 400 Bad Request responses that may indicate injection attempts
  • Deploy network intrusion detection systems (IDS) with signatures for HTTP header injection patterns
  • Audit Python applications for user-controllable input flowing into HTTPConnection.request() method parameters

Monitoring Recommendations

  • Enable verbose logging in Python HTTP client applications to capture full request details
  • Configure centralized log aggregation to correlate suspicious HTTP activity across services
  • Establish baseline HTTP traffic patterns to identify anomalous request methods

How to Mitigate CVE-2020-26116

Immediate Actions Required

  • Upgrade Python to patched versions: 3.5.10+, 3.6.12+, 3.7.9+, or 3.8.5+
  • Audit application code for any instances where user input influences HTTP method parameters
  • Implement input validation to reject HTTP methods containing control characters
  • Apply vendor-specific security patches from distribution maintainers

Patch Information

Security patches have been released by Python and various Linux distributions. The fix ensures that HTTP methods are properly validated to reject control characters before being included in HTTP requests. Refer to the following resources for patching:

  • Python Bug Report #39603 - Original bug report and fix details
  • Ubuntu Security Notice USN-4581-1 - Ubuntu patched packages
  • Gentoo GLSA 202101-18 - Gentoo security advisory
  • NetApp Security Advisory - NetApp affected products

Workarounds

  • Sanitize all user input before passing to HTTPConnection.request() by stripping or rejecting CR and LF characters
  • Use application-level input validation to ensure HTTP methods contain only alphanumeric characters
  • Consider wrapping HTTP client calls with a validation layer that checks method parameters
bash
# Example: Check Python version and upgrade if vulnerable
python3 --version
# If version is below 3.5.10, 3.6.12, 3.7.9, or 3.8.5, upgrade:
# For Debian/Ubuntu:
sudo apt update && sudo apt upgrade python3
# For RHEL/CentOS/Fedora:
sudo dnf update python3
# Verify updated version:
python3 --version

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechPython

  • SeverityHIGH

  • CVSS Score7.2

  • EPSS Probability1.39%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-74
  • Technical References
  • OpenSUSE Security Announcement

  • Debian LTS Security Announcement

  • Debian LTS Security Update

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Gentoo GLSA 202101-18

  • NetApp Security Advisory ntap-20201023-0001

  • Ubuntu Security Notice USN-4581-1
  • Vendor Resources
  • Python Bug Report #39603

  • Python Security Vulnerability Analysis

  • Oracle October 2021 Security Alerts
  • Related CVEs
  • CVE-2025-13462: Python tarfile Module Parsing Vulnerability

  • CVE-2021-23336: Python Web Cache Poisoning Vulnerability

  • CVE-2024-6923: CPython Email Header Injection Flaw

  • CVE-2020-15523: Python DLL Hijacking 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