CVE-2021-29921
In Python before 3,9,5, the ipaddress library mishandles leading zero characters in the octets of an IP address string. This (in some situat
CVSS
9.8
Critical
EPSS
6.8%
p94
KEV
—
Exploit Today
28
0-100
Published: May 6, 2021 · Last modified: Oct 8, 2026
6.8%EPSS · 30 days6.9%
2026-10-032026-10-31
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.
- bugs.python.orghttps://bugs.python.org/issue36384
- docs.python.orghttps://docs.python.org/3/library/ipaddress.html
- github.comhttps://github.com/python/cpython/blob/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Misc/NEWS.d/3.8.0a4.rst
- github.comhttps://github.com/python/cpython/pull/12577
- github.comhttps://github.com/python/cpython/pull/25099
- github.comhttps://github.com/sickcodes
- github.comhttps://github.com/sickcodes/security/blob/master/advisories/SICK-2021-014.md
- python-security.readthedocs.iohttps://python-security.readthedocs.io/vuln/ipaddress-ipv4-leading-zeros.html
- security.gentoo.orghttps://security.gentoo.org/glsa/202305-02
- security.netapp.comhttps://security.netapp.com/advisory/ntap-20210622-0003/
- sick.codeshttps://sick.codes/sick-2021-014
- www.oracle.comhttps://www.oracle.com//security-alerts/cpujul2021.html
- www.oracle.comhttps://www.oracle.com/security-alerts/cpuapr2022.html
- www.oracle.comhttps://www.oracle.com/security-alerts/cpujan2022.html
- www.oracle.comhttps://www.oracle.com/security-alerts/cpujul2022.html
- www.oracle.comhttps://www.oracle.com/security-alerts/cpuoct2021.html
- bugs.python.orghttps://bugs.python.org/issue36384
- docs.python.orghttps://docs.python.org/3/library/ipaddress.html
- github.comhttps://github.com/python/cpython/blob/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Misc/NEWS.d/3.8.0a4.rst
- github.comhttps://github.com/python/cpython/pull/12577
No related CVEs by CWE or product.