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-4032: Vulnerability in Python Software Foundation CPython

0
High
VulnerabilityCVE-2024-4032cvecve-2024-4032
Published: Mon Jun 17 2024 (06/17/2024, 15:05:58 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: CPython

Description

The “ipaddress” module contained incorrect information about whether certain IPv4 and IPv6 addresses were designated as “globally reachable” or “private”. This affected the is_private and is_global properties of the ipaddress.IPv4Address, ipaddress.IPv4Network, ipaddress.IPv6Address, and ipaddress.IPv6Network classes, where values wouldn’t be returned in accordance with the latest information from the IANA Special-Purpose Address Registries. CPython 3.12.4 and 3.13.0a6 contain updated information from these registries and thus have the intended behavior.

AI-Powered Analysis

AILast updated: 11/03/2025, 22:23:44 UTC

Technical Analysis

CVE-2024-4032 identifies a vulnerability in the CPython ipaddress module where the logic determining whether an IP address is 'private' or 'globally reachable' is flawed due to outdated or incorrect information from the IANA Special-Purpose Address Registries. Specifically, the is_private and is_global properties of the ipaddress.IPv4Address, IPv4Network, IPv6Address, and IPv6Network classes return inaccurate results for certain IP addresses. This misclassification can cause software relying on these properties for network segmentation, access control, or security filtering to make erroneous decisions. For example, an address that should be treated as private might be considered globally reachable, potentially allowing unauthorized external access or bypassing firewall rules. Conversely, globally reachable addresses might be mistakenly blocked or restricted. The vulnerability affects CPython versions from 3.9.0 up to 3.13.0a1, with corrected behavior implemented in versions 3.12.4 and 3.13.0a6, which update the ipaddress module with the latest IANA registry data. The CVSS 3.1 score of 7.5 reflects a high severity, with an attack vector of network (AV:N), low attack complexity (AC:L), no privileges required (PR:N), and no user interaction (UI:N). The impact is primarily on confidentiality, as incorrect address classification could lead to exposure of sensitive network resources. No known exploits have been reported yet, but the vulnerability poses a significant risk to applications and systems that rely on Python's ipaddress module for network security decisions.

Potential Impact

For European organizations, this vulnerability could lead to improper network access control and filtering decisions, potentially exposing internal systems or sensitive data to unauthorized external entities. Organizations using Python in network security appliances, firewall configurations, cloud infrastructure automation, or any software that programmatically validates IP addresses may inadvertently trust addresses that should be private or block legitimate global addresses, disrupting services or enabling data exfiltration. Critical infrastructure sectors such as finance, telecommunications, healthcare, and government services that rely on Python-based tools for network management are at heightened risk. The confidentiality of internal communications and data could be compromised if attackers exploit this misclassification to bypass security controls. Additionally, compliance with data protection regulations like GDPR could be impacted if unauthorized access leads to personal data exposure. The absence of required privileges or user interaction for exploitation increases the risk of automated or remote attacks.

Mitigation Recommendations

European organizations should immediately upgrade affected Python environments to CPython versions 3.12.4 or 3.13.0a6 or later, which contain the corrected ipaddress module data. For environments where immediate upgrading is not feasible, organizations should implement compensating controls such as manual validation of IP address classifications against the latest IANA Special-Purpose Address Registries or use alternative libraries with verified address classification. Network security teams should audit firewall and access control rules that rely on Python ipaddress module outputs to ensure no misconfigurations exist due to this vulnerability. Incorporating additional network monitoring to detect anomalous access patterns involving IP addresses previously misclassified can help identify exploitation attempts. Organizations should also review and update internal policies and automation scripts that depend on the ipaddress module to ensure they handle IP address classifications correctly. Maintaining awareness of updates from the Python Software Foundation and applying patches promptly is critical. Finally, penetration testing and vulnerability scanning should include checks for this specific vulnerability to validate remediation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
PSF
Date Reserved
2024-04-22T17:15:47.895Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 690929b1fe7723195e0fd86a

Added to database: 11/3/2025, 10:16:17 PM

Last enriched: 11/3/2025, 10:23:44 PM

Last updated: 11/4/2025, 4:49:12 AM

Views: 7

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