BIT-python-min-2024-4032: Incorrect IPv4 and IPv6 private ranges

Published Jun 17, 2024
·
Updated

The “ipaddress” module contained incorrect information about whether certain IPv4 and IPv6 addresses were designated as “globally reachable” or “private”. This affected the isprivate and isglobal 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.

Affected Software

1 affected component
Python Software Foundation CPython<3.12.4, <3.13.0a6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade CPython to a version that resolves this vulnerability.

    Fixed in 3.12.4
  2. Upgrade

    Upgrade CPython to a version that resolves this vulnerability.

    Fixed in 3.13.0a6

Event History

Jun 17, 2024
CVE Published
via OSV·03:05 PM
Data Sourced
via OSV·03:05 PM
DescriptionSeverity

Frequently Asked Questions

1

Which applications are most likely to be affected by this issue?

Applications that make security, access-control, routing, filtering, or trust decisions using the ipaddress module’s is_private or is_global properties may be affected. The issue applies to IPv4Address, IPv4Network, IPv6Address, and IPv6Network values.

2

Can this be exploited remotely without authentication?

The supplied severity vector indicates network reachability, low attack complexity, no privileges required, and no user interaction required. Exploitation would depend on an application relying on the incorrect address classification when handling attacker-controlled IP addresses.

3

Which CPython releases contain the corrected address-classification data?

CPython 3.12.4 and 3.13.0a6 contain updated IANA Special-Purpose Address Registry information and have the intended behavior.

4

How can I determine whether an application is exposed?

Identify uses of ipaddress.IPv4Address, IPv4Network, IPv6Address, or IPv6Network that rely on is_private or is_global. Verify whether those decisions involve address ranges whose IANA special-purpose classification may have changed and whether the runtime includes the updated registry information.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203