{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-29921","id":"CVE-2021-29921","title":"ipaddress leading zeros in IPv4 address","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.","descriptionLong":"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.","published":"2021-05-06T00:00:00.000Z","updated":"2026-11-10T10:45:24.542094573Z","reserved":"2021-04-01T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","rating":"high","source":"NVD"}],"rating":"critical","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"version":"n/a","status":"affected"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":["BIT-libpython-2021-29921","BIT-python-2021-29921","BIT-python-min-2021-29921","PSF-2021-2"],"references":[{"url":"https://github.com/sickcodes","tags":["x_transferred","Third Party Advisory","advisory"]},{"url":"https://docs.python.org/3/library/ipaddress.html","tags":["x_transferred","Vendor Advisory","advisory"]},{"url":"https://github.com/python/cpython/blob/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Misc/NEWS.d/3.8.0a4.rst","tags":["x_transferred","Third Party Advisory","advisory"]},{"url":"https://sick.codes/sick-2021-014","tags":["x_transferred","Exploit","Third Party Advisory","evidence","web"]},{"url":"https://www.oracle.com//security-alerts/cpujul2021.html","tags":["x_transferred","Patch","Third Party Advisory","fix"]},{"url":"https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-014.md","tags":["x_transferred","Exploit","Third Party Advisory","evidence"]},{"url":"https://python-security.readthedocs.io/vuln/ipaddress-ipv4-leading-zeros.html","tags":["x_transferred","Vendor Advisory","advisory"]},{"url":"https://bugs.python.org/issue36384","tags":["x_transferred","Issue Tracking","Patch","Vendor Advisory","fix"]},{"url":"https://github.com/python/cpython/pull/12577","tags":["x_transferred","Patch","Third Party Advisory","fix"]},{"url":"https://github.com/python/cpython/pull/25099","tags":["x_transferred","Patch","Third Party Advisory","fix"]},{"url":"https://security.netapp.com/advisory/ntap-20210622-0003/","tags":["x_transferred","Third Party Advisory","advisory"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2021.html","tags":["x_transferred","Patch","Third Party Advisory","fix"]},{"url":"https://www.oracle.com/security-alerts/cpujan2022.html","tags":["x_transferred","Patch","Third Party Advisory","fix"]},{"url":"https://www.oracle.com/security-alerts/cpuapr2022.html","tags":["x_transferred","Patch","Third Party Advisory","fix"]},{"url":"https://www.oracle.com/security-alerts/cpujul2022.html","tags":["x_transferred","web"]},{"url":"https://security.gentoo.org/glsa/202305-02","tags":["vendor-advisory","x_transferred","advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.06761,"epssPercentile":0.94126,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-29921","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29921","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-29921","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-29921","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}