BIT-libpython-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
Who is exposed to this issue?
Applications using Python's ipaddress library for IP-address-based access control are exposed if they process address strings containing octets with leading zero characters. The affected Python versions are before 3.9.5.
What does an attacker need to exploit it?
An attacker needs to provide an IP address string with leading zero characters in one or more octets to an affected application. Exploitation depends on the application's access-control logic relying on ipaddress parsing.
Are default Python installations affected?
The vulnerable behavior is in the ipaddress library in Python versions before 3.9.5. Impact requires an application to use that library in IP-address-based access-control decisions.
What should be done if patching is not immediately possible?
The provided information does not specify a workaround. Prioritize reviewing and protecting IP-address-based access-control paths that accept address strings with leading-zero octets until affected Python versions can be updated.