BIT-python-min-2021-29921: Critical severity Python Software Foundation Python vulnerability

Published May 6, 2021
·
Updated

In Python before 3,9,5, the ipaddress library mishandles leading zero characters in the octets of an IP address string. This (in some situations) allows attackers to bypass access control that is based on IP addresses.

Affected Software

1 affected component
Python Software Foundation Python<3.9.5

Event History

May 6, 2021
CVE Published
via OSV·01:15 PM
Data Sourced
via OSV·01:15 PM
DescriptionSeverity

Frequently Asked Questions

1

Which deployments are realistically exposed to this issue?

Deployments using Python versions before 3.9.5 are exposed when they rely on the ipaddress library to parse IP address strings for IP-based access-control decisions.

2

What does an attacker need to exploit the issue?

An attacker needs to supply an IP address string containing leading zero characters in one or more octets to a vulnerable IP-based access-control path. No privileges or user interaction are required according to the provided severity vector.

3

Is every use of the ipaddress library affected?

The stated impact is an access-control bypass in situations where parsing results are used to enforce IP-address-based restrictions. The data does not indicate an impact for uses that do not make access-control decisions from parsed addresses.

4

How can I determine whether an application may be affected?

Check whether it runs Python earlier than 3.9.5 and uses the ipaddress library to validate, normalize, compare, or authorize user-controlled IP address strings. Pay particular attention to inputs with leading zeroes in their octets.

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