Original description
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
- Python ≥ 3.8.0 < 3.8.12≥ 3.9.0 < 3.9.5 Fixed in: 3.8.12, 3.9.5 exact match
Details
- Published
- 2021-05-06
- Last modified
- 2026-10-09
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- EPSS (30-day exploit probability)
- 6.76% (percentile 94)
References
- cve.org/CVE-2021-29921
- nvd.nist.gov/vuln/detail/CVE-2021-29921
- github.com/sickcodes
- docs.python.org/3/library/ipaddress.html
- github.com/python/cpython/blob/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Misc/NEWS.d/3.8.0a...
- sick.codes/sick-2021-014
- www.oracle.com//security-alerts/cpujul2021.html
- github.com/sickcodes/security/blob/master/advisories/SICK-2021-014.md
- python-security.readthedocs.io/vuln/ipaddress-ipv4-leading-zeros.html
- bugs.python.org/issue36384
- github.com/python/cpython/pull/12577
- github.com/python/cpython/pull/25099
- security.netapp.com/advisory/ntap-20210622-0003/
- www.oracle.com/security-alerts/cpuoct2021.html
Track these versions on your own servers
InfraGuard collects installed software versions from every server and flags the ones with known vulnerabilities. Self-hosted — nothing leaves your network.
This product uses data from the NVD API but is not endorsed or certified by the NVD. CVE® is a registered trademark of The MITRE Corporation; CVE records are used under the CVE Program Terms of Use.