CVE-2021-28861
Python vulnerability analysis and mitigation

Overview

CVE-2021-28861 affects Python versions 3.x through 3.10, specifically in the lib/http/server.py module. The vulnerability is an open redirection flaw due to no protection against multiple forward slashes (/) at the beginning of URI paths, which could lead to information disclosure. This issue is disputed as the http.server.html documentation explicitly states that the server is not recommended for production use and only implements basic security checks (NVD).

Technical details

The vulnerability exists in Python's SimpleHTTPServer module where there is no validation for multiple forward slashes at the beginning of a URL path. When a URL contains multiple leading slashes (e.g., //attacker.com/path), the server's redirect mechanism can be exploited to cause an open redirect. The issue has a CVSS v3.1 Base Score of 7.4 (HIGH) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N (NVD).

Impact

If exploited, this vulnerability could allow an attacker to craft malformed URIs that trigger open redirections to arbitrary domains. This could potentially lead to information disclosure or phishing attacks by redirecting users to malicious websites (Python Issue).

Exploitability

The vulnerability can be exploited by crafting a special URL that starts with multiple forward slashes followed by an attacker-controlled domain and a path to an existing directory on the server. For example: http://127.0.0.1:8000//attacker.com/..%2f..%2f../anyexistingdirectory. When such a URL is accessed, the server will issue a redirect to the attacker's domain (Python PR).

Mitigation and workarounds

The vulnerability has been patched in various Python versions. The fix involves implementing proper validation of URL paths to prevent multiple leading slashes from causing unintended redirections. Users should upgrade to patched versions: Python 3.9.14+, 3.10.8+, or newer releases. As a general security practice, it's recommended not to use http.server in production environments as stated in the documentation (Python PR).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-59971CRITICAL10
  • Python logoPython
  • mysql-mcp-server
NoYesSep 11, 2026
CVE-2026-59177HIGH8.8
  • Python logoPython
  • esphome-device-builder
NoYesSep 09, 2026
CVE-2026-88006MEDIUM6.5
  • Python logoPython
  • open-webui
NoYesSep 10, 2026
CVE-2026-88005MEDIUM6.5
  • Python logoPython
  • open-webui
NoYesSep 10, 2026
CVE-2026-49836MEDIUM4.6
  • Python logoPython
  • psd-tools
NoYesSep 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management