Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-11168: Vulnerability in Python Software Foundation CPython

0
Medium
VulnerabilityCVE-2024-11168cvecve-2024-11168
Published: Tue Nov 12 2024 (11/12/2024, 21:22:23 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: CPython

Description

The urllib.parse.urlsplit() and urlparse() functions improperly validated bracketed hosts (`[]`), allowing hosts that weren't IPv6 or IPvFuture. This behavior was not conformant to RFC 3986 and potentially enabled SSRF if a URL is processed by more than one URL parser.

AI-Powered Analysis

AILast updated: 11/03/2025, 23:16:19 UTC

Technical Analysis

CVE-2024-11168 is a vulnerability in the Python Software Foundation's CPython implementation, specifically in the urllib.parse module's urlsplit() and urlparse() functions. These functions are responsible for parsing URLs and validating host components. The vulnerability arises because these functions improperly validate bracketed hosts enclosed in square brackets ([]), which are intended to represent IPv6 or IPvFuture addresses according to RFC 3986. However, the affected functions allow hosts within brackets that are not valid IPv6 or IPvFuture addresses. This improper validation can cause inconsistencies when a URL is processed by multiple parsers or components that enforce stricter RFC compliance. An attacker can exploit this discrepancy to craft malicious URLs that bypass security checks, leading to Server-Side Request Forgery (SSRF) attacks. SSRF allows an attacker to induce the server to make HTTP requests to arbitrary internal or external resources, potentially exposing sensitive internal services or data. The vulnerability affects CPython versions 0 (likely meaning all versions prior to 3.10), 3.10.0, 3.11.0, and the early 3.12.0a1 alpha release. The CVSS 4.0 base score is 6.3, indicating medium severity, with network attack vector, high attack complexity, no privileges required, no user interaction, and limited impact on integrity. No known exploits have been reported in the wild at the time of publication. The vulnerability is classified under CWE-918 (Server-Side Request Forgery).

Potential Impact

For European organizations, this vulnerability poses a risk primarily to web applications and services developed in Python that rely on urllib.parse for URL processing. SSRF vulnerabilities can be leveraged to access internal network resources that are otherwise inaccessible from the internet, potentially leading to data exposure, unauthorized access to internal APIs, or pivoting within the network. Organizations in sectors such as finance, healthcare, government, and critical infrastructure, which often use Python for backend services, could be targeted to gain access to sensitive internal systems. The impact is heightened in environments where multiple URL parsers or security controls rely on different URL validation logic, allowing attackers to bypass protections. Additionally, cloud service providers and SaaS companies operating in Europe that use vulnerable Python versions may face risks of internal resource exposure. The medium severity rating reflects that exploitation requires some complexity and careful crafting of URLs, but no authentication or user interaction is needed, increasing the attack surface. The absence of known exploits suggests a window for proactive mitigation.

Mitigation Recommendations

1. Upgrade CPython to a patched version once released by the Python Software Foundation that corrects the bracketed host validation logic in urllib.parse. 2. In the interim, implement strict input validation on URLs before processing, ensuring that bracketed hosts conform strictly to valid IPv6 or IPvFuture formats. 3. Employ network-level controls such as egress filtering and internal firewall rules to restrict server-initiated HTTP requests to trusted destinations only, limiting SSRF impact. 4. Use application-layer protections like web application firewalls (WAFs) configured to detect and block suspicious URL patterns or SSRF attempts. 5. Review and audit codebases for multiple URL parsing steps or components that may interpret URLs differently, standardizing on a single, secure parsing method. 6. Monitor logs for unusual outbound requests or anomalies in URL processing that could indicate exploitation attempts. 7. Educate developers about the risks of SSRF and the importance of proper URL validation and sanitization.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
PSF
Date Reserved
2024-11-12T21:13:15.779Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69092615fe7723195e0b359d

Added to database: 11/3/2025, 10:00:53 PM

Last enriched: 11/3/2025, 11:16:19 PM

Last updated: 11/5/2025, 2:48:18 PM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats