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
    • 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-2021-3733

CVE-2021-3733: Python urllib ReDoS Denial of Service Flaw

CVE-2021-3733 is a Regular Expression Denial of Service flaw in Python's urllib AbstractBasicAuthHandler that allows malicious servers to disrupt client availability. This article covers technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-3733 Overview

A Regular Expression Denial of Service (ReDoS) vulnerability exists in Python's urllib library, specifically within the AbstractBasicAuthHandler class. An attacker who controls a malicious HTTP server that an HTTP client connects to can trigger this vulnerability by sending a specially crafted payload during an authentication request. This flaw primarily threatens application availability by causing excessive CPU consumption during regex processing.

Critical Impact

Applications using Python's urllib for HTTP authentication can be rendered unresponsive when connecting to malicious servers that exploit the inefficient regex pattern in the authentication handler.

Affected Products

  • Python (multiple versions including 3.10.0)
  • Red Hat Enterprise Linux 8.x and EUS versions
  • Red Hat CodeReady Linux Builder 8.0
  • Fedora 33, 34, 35, 36
  • NetApp Management Services for Element Software and NetApp HCI
  • NetApp ONTAP Select Deploy Administration Utility
  • NetApp SolidFire, Enterprise SDS & HCI Storage Node

Discovery Timeline

  • 2022-03-10 - CVE-2021-3733 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2021-3733

Vulnerability Analysis

The vulnerability resides in the regular expression used by Python's AbstractBasicAuthHandler class within the urllib.request module. The flaw occurs because the regex pattern used to parse HTTP authentication headers contains an inefficient character class that can lead to catastrophic backtracking when processing maliciously crafted input.

When an HTTP client using urllib connects to a malicious server, the server can send a specially crafted WWW-Authenticate header that triggers exponential regex evaluation time. This causes the client application to hang or consume excessive CPU resources, effectively creating a denial of service condition.

The vulnerability is exploitable over the network without requiring any privileges on the victim system. An attacker only needs to control or compromise an HTTP server that the victim's Python application connects to. The attack does not require user interaction once the application initiates a connection to the malicious endpoint.

Root Cause

The root cause is an inefficient regular expression pattern in the urllib.request module. The original regex pattern '([^ \\t]+)' for matching the authentication scheme did not properly exclude comma characters from the character class. This omission allowed specially crafted input strings to cause excessive backtracking in the regex engine, leading to exponential time complexity during pattern matching.

Attack Vector

The attack is conducted over the network by a malicious HTTP server. When a Python HTTP client using urllib attempts to authenticate with a server controlled by an attacker, the server responds with a malformed WWW-Authenticate header containing a payload designed to trigger catastrophic regex backtracking. The client application becomes unresponsive while attempting to parse the malicious header, resulting in denial of service.

python
# Security patch in Lib/urllib/request.py - bpo-43075: Fix ReDoS in urllib AbstractBasicAuthHandler (GH-24391)
     # (single quotes are a violation of the RFC, but appear in the wild)
     rx = re.compile('(?:^|,)'   # start of the string or ','
                     '[ \t]*'    # optional whitespaces
-                    '([^ \t]+)' # scheme like "Basic"
+                    '([^ \t,]+)' # scheme like "Basic"
                     '[ \t]+'    # mandatory whitespaces
                     # realm=xxx
                     # realm='xxx'

Source: GitHub CPython Commit

Detection Methods for CVE-2021-3733

Indicators of Compromise

  • Unusual CPU spikes in Python processes making HTTP authentication requests
  • Application hangs or unresponsiveness when connecting to external HTTP services
  • Network connections to unknown or suspicious HTTP servers that remain open for extended periods
  • Log entries indicating failed or stalled authentication attempts

Detection Strategies

  • Monitor Python application performance for anomalous CPU usage during HTTP operations
  • Implement request timeouts for HTTP client connections to detect hanging requests
  • Audit network traffic for connections to untrusted HTTP endpoints that respond with unusual WWW-Authenticate headers
  • Review application logs for authentication handler timeout events or exceptions

Monitoring Recommendations

  • Configure alerting on Python process CPU utilization thresholds exceeding normal baselines
  • Implement network monitoring to detect long-lived HTTP connections that may indicate ReDoS exploitation
  • Deploy application performance monitoring (APM) tools to track urllib request latency
  • Enable verbose logging for HTTP authentication events to identify malicious server responses

How to Mitigate CVE-2021-3733

Immediate Actions Required

  • Update Python to a patched version that includes the fix for bpo-43075
  • Implement connection timeouts for all HTTP client operations using urllib
  • Review and restrict network access to untrusted HTTP endpoints
  • Consider using alternative HTTP libraries with proper input validation for critical applications

Patch Information

The vulnerability has been addressed in Python through PR #24391. The fix modifies the regex pattern in Lib/urllib/request.py to properly exclude comma characters from the scheme matching character class, changing '([^ \\t]+)' to '([^ \\t,]+)'. This prevents the catastrophic backtracking condition.

Patches are available through:

  • Python Issue Tracker (bpo-43075)
  • Ubuntu Security Advisory
  • NetApp Security Advisory NTAP-20220407-0001
  • Red Hat Enterprise Linux updates for affected versions

Workarounds

  • Implement strict timeout values for all HTTP requests using urllib to prevent indefinite hangs
  • Use firewall rules to restrict outbound HTTP connections to known trusted endpoints only
  • Deploy a proxy server to inspect and sanitize HTTP authentication headers before reaching Python applications
  • Consider temporarily switching to alternative HTTP libraries like requests with proper timeout configuration
bash
# Configuration example - Setting connection timeouts in Python applications
# Add socket timeout before urllib operations
import socket
socket.setdefaulttimeout(30)  # 30 second global timeout

# Or configure per-request timeout
import urllib.request
urllib.request.urlopen(url, timeout=30)

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechPython

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.64%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-400
  • Technical References
  • Red Hat Bug Report

  • Debian LTS Security Announcement May 2023

  • Debian LTS Security Announcement June 2023

  • NetApp Security Advisory NTAP-20220407-0001

  • Debian LTS Security Announcement December 2024
  • Vendor Resources
  • Python Issue Tracker Update

  • GitHub CPython Commit Log

  • GitHub Pull Request Discussion

  • Ubuntu CVE-2021-3733 Details
  • Related CVEs
  • CVE-2025-5302: llama_index JSONReader DoS Vulnerability

  • CVE-2025-13836: Python Python DOS Vulnerability

  • CVE-2026-0994: Google Protobuf Python DoS Vulnerability

  • CVE-2025-8194: CPython tarfile Module DoS 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