banner logoJoin us at RSAC™ 2026 Conference, March 23–March 26 | North Expo, Booth N-5863Join us at RSAC™ 2026, March 23–March 26Learn More
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI Security Portfolio
      Leading the Way in AI-Powered Security Solutions
    • 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
      Digital Forensics, IRR & Breach Readiness
    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
    • 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-28861

CVE-2021-28861: Python Open Redirection Vulnerability

CVE-2021-28861 is an open redirection flaw in Python 3.x through 3.10 affecting lib/http/server.py that may lead to information disclosure. This article covers technical details, affected versions, and mitigation steps.

Published: February 25, 2026

CVE-2021-28861 Overview

CVE-2021-28861 is an open redirection vulnerability affecting Python 3.x through version 3.10 in the lib/http/server.py module. The vulnerability exists due to insufficient protection against multiple forward slashes (/) at the beginning of a URI path, which can be exploited to redirect users to arbitrary external domains. This open redirection flaw can lead to information disclosure by tricking users into visiting malicious websites while believing they are navigating within a trusted application.

It is worth noting that this vulnerability is disputed by some parties, as the official Python documentation explicitly warns that http.server is not recommended for production use and only implements basic security checks.

Critical Impact

Attackers can exploit this open redirection vulnerability to redirect users to malicious external sites, potentially leading to credential theft, phishing attacks, or further exploitation through social engineering techniques.

Affected Products

  • Python 3.x through 3.10
  • Python 3.11.0 alpha1 through beta3
  • Fedora 35, 36, and 37

Discovery Timeline

  • 2022-08-23 - CVE-2021-28861 published to NVD
  • 2025-12-17 - Last updated in NVD database

Technical Details for CVE-2021-28861

Vulnerability Analysis

This vulnerability is classified as CWE-601 (URL Redirection to Untrusted Site, also known as 'Open Redirect'). The flaw resides in Python's built-in HTTP server module (http.server), specifically in how it handles URI paths that begin with multiple forward slashes.

When a request is made with a URI path starting with multiple slashes (e.g., //evil.com), the http.server module fails to properly sanitize or normalize the path. This allows attackers to craft malicious URLs that appear to point to a legitimate application but actually redirect users to an attacker-controlled external domain.

The network-based attack vector requires user interaction, as victims must click on a crafted malicious link. Once clicked, the redirect occurs transparently, potentially exposing sensitive information or leading users to phishing pages designed to harvest credentials.

Root Cause

The root cause of this vulnerability lies in the inadequate input validation within lib/http/server.py. The module does not properly handle URI paths that contain multiple leading forward slashes. In URL semantics, a path beginning with // followed by a hostname is interpreted as a protocol-relative URL, which browsers will resolve to an external domain rather than a path on the current server.

The absence of normalization logic to detect and reject or sanitize such malformed URI paths allows the open redirection attack to succeed.

Attack Vector

An attacker can exploit this vulnerability by crafting a URL that points to a vulnerable Python HTTP server but includes a malicious redirect path. For example, a link such as http://legitimate-server.com//attacker.com/phishing could redirect users to attacker.com/phishing instead of serving content from the legitimate server.

This attack is particularly effective in phishing campaigns where attackers leverage the trust users have in the legitimate domain. The vulnerability requires user interaction (clicking the malicious link) but can be delivered through email, social media, or embedded in web pages.

The vulnerability mechanism involves the HTTP server interpreting paths with multiple leading slashes incorrectly. For detailed technical analysis, refer to the Python Issue Tracker Report and the associated GitHub Pull Request.

Detection Methods for CVE-2021-28861

Indicators of Compromise

  • HTTP access logs showing requests with URI paths beginning with multiple forward slashes (e.g., //external-domain.com/path)
  • Unusual redirect responses (HTTP 301/302) pointing to external domains from the Python HTTP server
  • User reports of unexpected redirections when accessing legitimate application URLs

Detection Strategies

  • Monitor web server access logs for URI patterns containing // at the beginning of request paths
  • Implement web application firewall (WAF) rules to detect and block requests with malformed URI paths containing multiple leading slashes
  • Use network intrusion detection systems (IDS) to identify HTTP requests attempting open redirection patterns
  • Deploy SentinelOne's behavioral AI to detect anomalous redirection patterns and suspicious HTTP traffic

Monitoring Recommendations

  • Enable detailed HTTP request logging on all Python-based web servers to capture full URI paths
  • Configure alerting for HTTP responses that redirect to external domains not on an approved allowlist
  • Regularly audit Python application deployments to identify usage of http.server in production environments

How to Mitigate CVE-2021-28861

Immediate Actions Required

  • Upgrade Python to patched versions: 3.10.7, 3.9.14, 3.8.14, 3.7.14, or 3.11.0rc1 and later
  • Remove http.server from production deployments and replace with production-grade web servers such as nginx, Apache, or Gunicorn
  • Implement input validation at the application or reverse proxy layer to reject or sanitize URI paths with multiple leading slashes
  • Review and update any applications or scripts using http.server for testing or development purposes

Patch Information

Python has addressed this vulnerability in multiple maintenance releases. Patches are available through the GitHub Pull Request #93879. Users should update to the following fixed versions:

  • Python 3.10.7 or later
  • Python 3.9.14 or later
  • Python 3.8.14 or later
  • Python 3.7.14 or later
  • Python 3.11.0rc1 or later

Linux distributions have also released updates. Fedora users can obtain patches through the Fedora package announcements. Gentoo users should refer to GLSA 202305-02.

Workarounds

  • Deploy a reverse proxy (nginx, Apache, HAProxy) in front of Python HTTP servers to normalize and validate incoming URI paths
  • Implement application-level middleware to detect and reject requests with URI paths starting with multiple slashes
  • Use Python's http.server only in isolated development environments with no network exposure
  • Add network segmentation to prevent untrusted users from accessing Python HTTP server instances
bash
# Example: nginx reverse proxy configuration to block malicious URI paths
# Add to server block configuration
if ($request_uri ~* "^//") {
    return 400;
}

# Alternative: Rewrite multiple slashes to single slash
location / {
    rewrite ^//+(.*) /$1 permanent;
    proxy_pass http://python_backend;
}

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

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechPython

  • SeverityHIGH

  • CVSS Score7.4

  • EPSS Probability1.40%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-601
  • Technical References
  • Fedora Package Announcement 1

  • Fedora Package Announcement 2

  • Fedora Package Announcement 3

  • Fedora Package Announcement 4

  • Fedora Package Announcement 5

  • Fedora Package Announcement 6

  • Fedora Package Announcement 7

  • Fedora Package Announcement 8

  • Fedora Package Announcement 9

  • Fedora Package Announcement 10

  • Fedora Package Announcement 11

  • Fedora Package Announcement 12

  • Fedora Package Announcement 13

  • Fedora Package Announcement 14

  • Fedora Package Announcement 15

  • Gentoo GLSA 202305-02

  • Debian LTS Announcement 1
  • Vendor Resources
  • Python Issue Tracker Report

  • GitHub Pull Request Analysis

  • GitHub Pull Request Review
  • Related CVEs
  • CVE-2026-2297: CPython Information Disclosure Vulnerability

  • CVE-2025-12781: Python base64 Module Data Integrity Flaw

  • CVE-2024-4032: Python ipaddress Module Info Disclosure

  • CVE-2023-40217: Python TLS Information Disclosure Flaw
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
  • English
  • 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