Vulnerabilities · 2021 · Python
CVE-2021-29921
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.
High priority: this vulnerability is rated critical and can be attacked over the network without a login.
Affected products
Python, Communications Cloud Native Core Automated Test Suite, Communications Cloud Native Core Binding Support Function, Communications Cloud Native Core Network Slice Selection Function, Graalvm, Zfs Storage Appliance Kit. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Python runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- bugs.python.org/issue36384 · Patch
- docs.python.org/3/library/ipaddress.html · Vendor Advisory
- python-security.readthedocs.io/vuln/ipaddress-ipv4-leading-zeros.html · Vendor Advisory
- github.com/python/cpython/pull/12577 · Patch
- github.com/python/cpython/pull/25099 · Patch
- www.oracle.com//security-alerts/cpujul2021.html · Patch
- www.oracle.com/security-alerts/cpuapr2022.html · Patch
- www.oracle.com/security-alerts/cpujan2022.html · Patch
- nvd.nist.gov/vuln/detail/CVE-2021-29921
- cve.org/CVERecord?id=CVE-2021-29921
More vulnerabilities in Python products
CVE-2026-21441CVE-2025-66471CVE-2025-66418CVE-2025-50182CVE-2025-50181CVE-2025-48379CVE-2025-47273CVE-2025-13837All 231
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.