Appsecure logo

CVE-2021-28861: High Vulnerability in Python

CVE-2021-28861 is a high-severity vulnerability found in Python versions 3.x through 3.10, allowing for open redirection leading to potential information disclosure. Immediate attention is required to mitigate risks associated with this vulnerability.

HIGHCVSS 7.4 · Published August 23, 2022

Not a customer? See how AppSecure simulates real world attacks to protect your infrastructure.

Speak to Experts

CVE-2021-28861 is a high-severity vulnerability affecting Python versions 3.x through 3.10. This vulnerability allows for open redirection in the lib/http/server.py file due to a lack of protection against multiple slashes (/) at the beginning of the URI path, which may lead to information disclosure. Organizations utilizing these versions of Python should be aware of the potential risks associated with this vulnerability.

The CVSS score for this vulnerability is 7.4, which indicates a high severity. The vulnerability lies in the attack vector being network-based, and the complexity of the attack is low. Importantly, it requires no privileges to exploit, but it does require user interaction. Given these factors, organizations should prioritize patching immediately to mitigate potential risks.

Currently, there is no known public exploit for this vulnerability, and it is not listed in the Known Exploited Vulnerabilities (KEV) catalog. However, the risk to organizations includes potential information disclosure, which could lead to further attacks.

Organizations should address this vulnerability as part of their priority patch cycle to ensure their systems remain secure against possible exploitation.

Vulnerability Details

The official CVE description states: "Python 3.x through 3.10 has an open redirection vulnerability in lib/http/server.py due to no protection against multiple (/) at the beginning of URI path which may lead to information disclosure." This vulnerability is classified under CWE-601. The CVSS vector string for this vulnerability is CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N.

The affected systems include Python versions ranging from 3.0.0 up to, but not including, 3.7.14, as well as 3.8.0 to 3.8.14, 3.9.0 to 3.9.14, and 3.10.0 to 3.10.6. In addition, it affects various alpha and beta releases of Python 3.11.

Technical Analysis

The root cause of CVE-2021-28861 stems from the lack of validation in the URI parsing logic within the lib/http/server.py file. The attack vector is network-based, making it accessible to remote attackers. The attack complexity is low, as the requirements for exploitation are minimal. No privileges are required for an attacker to exploit this vulnerability, and user interaction is necessary to trigger the open redirection.

The impact of this vulnerability is significant, with a high confidentiality impact due to potential information disclosure. There are no integrity or availability impacts reported.

Risk & Impact Analysis

Real-world deployment of the affected Python versions could expose organizations to significant risk, particularly if sensitive information is routed through the vulnerable server. Given the high CVSS score of 7.4, organizations should treat this vulnerability with urgency.

The blast radius potential is considerable, especially for organizations that rely on Python for web applications. The requirement for user interaction does mitigate the risk somewhat, but the potential for exploitation remains. Organizations should prioritize remediation efforts as part of their security strategy.

Signal

Status

Known Exploit

No

Public PoC

No

Actively Exploited

No

Ransomware Use

No

Affected Versions

The following versions of Python are affected by CVE-2021-28861: All versions from 3.0.0 to 3.6.14, 3.8.0 to 3.8.14, 3.9.0 to 3.9.14, and 3.10.0 to 3.10.6, as well as various alpha and beta releases of 3.11. For Fedora, versions 35, 36, and 37 are also impacted.

Mitigation & Remediation

Organizations should prioritize patching by upgrading to the latest version of Python that addresses this vulnerability. If an immediate patch cannot be applied, consider implementing configuration hardening and network controls to mitigate exposure to this vulnerability. Regular monitoring and security testing can also assist in identifying potential risks.

penetration testing can help validate the effectiveness of these mitigations.

Detection Guidance

Monitoring logs for abnormal access patterns, particularly around URI paths with multiple slashes, is crucial. Behavioral anomalies that deviate from normal request patterns should be investigated. Additionally, network signatures can be established to detect potential exploitation attempts.

AppSecure Threat Intelligence Insight

The long-term significance of CVE-2021-28861 highlights the importance of rigorous URI validation in web applications. This vulnerability represents a broader trend where minimal security checks can lead to significant security flaws. Security teams should leverage this incident to reinforce their defenses against similar vulnerabilities.

Effective penetration testing methodologies should be employed to regularly assess application security and discover potential vulnerabilities.

A robust vulnerability management program is essential for proactively identifying and mitigating risks.

API security assessments should also be integrated into the security strategy to address potential vulnerabilities effectively.

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

Latest CVEs. Recently published vulnerabilities from the NVD database.

View all vulnerabilities
CVE IDSeverity
CVE-2025-65418HIGH
CVE-2025-65417MEDIUM
CVE-2025-65416MEDIUM
CVE-2025-65415MEDIUM
CVE-2025-61314HIGH

Protect Your Business with Hacker-Focused Approach.