BIT-python-min-2021-29921: Critical severity Python Software Foundation Python vulnerability
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
Event History
Frequently Asked Questions
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.
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.
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.
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.