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

CVE-2020-8492: Python ReDoS Vulnerability in urllib

CVE-2020-8492 is a Regular Expression Denial of Service (ReDoS) flaw in Python's urllib.request module that allows HTTP servers to launch DoS attacks. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2020-8492 Overview

Python 2.7 through 2.7.17, 3.5 through 3.5.9, 3.6 through 3.6.10, 3.7 through 3.7.6, and 3.8 through 3.8.1 allows an HTTP server to conduct Regular Expression Denial of Service (ReDoS) attacks against a client because of urllib.request.AbstractBasicAuthHandler catastrophic backtracking. This vulnerability affects the core Python HTTP client library, making any Python application using urllib for HTTP requests with Basic Authentication potentially vulnerable to denial of service attacks from malicious servers.

Critical Impact

A malicious HTTP server can cause Python clients to hang indefinitely by sending specially crafted WWW-Authenticate headers that trigger catastrophic regex backtracking in the Basic Authentication handler, leading to denial of service.

Affected Products

  • Python 2.7 through 2.7.17
  • Python 3.5 through 3.5.9
  • Python 3.6 through 3.6.10
  • Python 3.7 through 3.7.6
  • Python 3.8 through 3.8.1
  • openSUSE Leap 15.1
  • Canonical Ubuntu Linux (12.04, 14.04, 16.04, 18.04, 19.10, 20.04)
  • Fedora 31 and 32
  • Debian Linux 9.0

Discovery Timeline

  • 2020-01-30 - CVE-2020-8492 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-8492

Vulnerability Analysis

This vulnerability exists in Python's urllib.request.AbstractBasicAuthHandler class, which handles HTTP Basic Authentication challenges. The handler uses a regular expression to parse the WWW-Authenticate header returned by HTTP servers. The regex pattern contains nested quantifiers that exhibit catastrophic backtracking behavior when processing specially crafted input strings.

When a Python client makes an HTTP request to a malicious server, the server can respond with a WWW-Authenticate header containing a carefully constructed string that causes the regex engine to enter an exponentially growing number of backtracking operations. This results in the client's CPU becoming fully consumed while attempting to match the pattern, effectively creating a denial of service condition where the application becomes unresponsive.

The vulnerability is particularly concerning because it inverts the typical DoS attack model—instead of clients attacking servers, this allows servers to attack clients. Any Python application that uses urllib.request to fetch resources from untrusted URLs could be affected.

Root Cause

The root cause is a poorly constructed regular expression pattern in the AbstractBasicAuthHandler class that processes HTTP Basic Authentication challenges. The regex contains overlapping quantifiers that can match the same input in multiple ways, leading to catastrophic backtracking when the input is crafted to maximize these ambiguities. This is classified as CWE-400 (Uncontrolled Resource Consumption), as the vulnerability allows an attacker to consume excessive CPU resources on the victim's system.

Attack Vector

The attack is network-based and requires user interaction in the sense that the victim's Python application must make an HTTP request to a malicious server. The attacker must control or compromise an HTTP server that the victim application connects to. When the client sends a request, the malicious server responds with a 401 Unauthorized status code along with a WWW-Authenticate: Basic header containing a malformed realm parameter designed to trigger catastrophic regex backtracking.

The attack mechanism relies on the regex engine's backtracking behavior. By providing input that partially matches the pattern in many different ways, the attacker forces the regex engine to explore an exponentially growing number of possibilities before determining a final match or mismatch.

Detection Methods for CVE-2020-8492

Indicators of Compromise

  • Python processes exhibiting 100% CPU usage during HTTP client operations
  • Application hangs or timeouts when making HTTP requests to external servers
  • Unusual WWW-Authenticate headers in HTTP response logs containing long or repetitive strings
  • Network connections to HTTP servers that remain open indefinitely without completing

Detection Strategies

  • Monitor Python application performance for sudden CPU spikes correlated with outbound HTTP requests
  • Implement HTTP response header logging and analyze WWW-Authenticate headers for abnormally long or suspicious content
  • Use application-level timeouts on HTTP operations to detect and recover from potential ReDoS conditions
  • Deploy network monitoring to identify HTTP 401 responses with unusually large header sizes

Monitoring Recommendations

  • Enable detailed logging for urllib HTTP client operations in Python applications
  • Set up alerting for Python process CPU utilization exceeding normal thresholds
  • Monitor application response times and flag requests that exceed expected duration
  • Track HTTP error rates, particularly 401 responses from untrusted external servers

How to Mitigate CVE-2020-8492

Immediate Actions Required

  • Upgrade Python to a patched version: 2.7.18+, 3.5.10+, 3.6.11+, 3.7.7+, or 3.8.2+
  • Review applications for urllib usage with Basic Authentication against untrusted servers
  • Implement request timeouts as a defense-in-depth measure for all HTTP client operations
  • Consider using alternative HTTP libraries such as requests with explicit timeout configurations

Patch Information

The Python Software Foundation has addressed this vulnerability in subsequent Python releases. The fix modifies the regular expression pattern in urllib.request.AbstractBasicAuthHandler to eliminate the catastrophic backtracking condition. For detailed information on the fix, refer to the Python Issue Tracker Entry and the GitHub PR #18284.

Distribution-specific patches are available from:

  • Ubuntu Security Notice #4333-1
  • Debian LTS Announcement
  • Gentoo GLSA 2020-05-09
  • Fedora Package Announcements

Workarounds

  • Implement socket-level timeouts using socket.setdefaulttimeout() to prevent indefinite hangs
  • Use HTTP client libraries with built-in timeout functionality instead of raw urllib
  • Deploy a proxy layer that inspects and sanitizes incoming HTTP headers before they reach Python applications
  • Restrict outbound HTTP requests to trusted, known-good servers when possible
bash
# Configuration example - Setting default socket timeout
python -c "import socket; socket.setdefaulttimeout(30)"

# Or in application code, ensure timeouts are set:
# import socket
# socket.setdefaulttimeout(30)  # 30 second timeout

# Using requests library with explicit timeout (recommended alternative)
# pip install requests
# import requests
# response = requests.get(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 Probability4.56%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-400
  • Technical References
  • openSUSE Security Announcement

  • Apache Cassandra Commit Thread

  • Apache Cassandra Commit Thread

  • Debian LTS Announcement

  • Debian LTS Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Python Security Documentation

  • Gentoo GLSA 2020-05-09

  • NetApp Security Advisory

  • Ubuntu Security Notice #4333-1
  • Vendor Resources
  • Python Issue Tracker Entry

  • GitHub PR #18284
  • Related CVEs
  • CVE-2025-13836: Python Python DOS Vulnerability

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

  • CVE-2025-8194: CPython tarfile Module DoS Vulnerability

  • CVE-2024-8088: CPython zipfile.Path 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