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 situations) allows attackers to bypass access control that is
02 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
03 Exploitation and scoring
- Exploitation
- Assessed, none found. CISA's assessment recorded neither public exploit code nor evidence of exploitation when it was made.
- SSVC decision
- ExploitationnoneCISA recorded no public exploit code and no evidence of exploitation.
- AutomatableyesAn attacker can reliably automate reconnaissance through exploitation, so this scales.
- Technical ImpacttotalSuccessful exploitation gives total control of the vulnerable component.
- EPSS probability
- 6.88% probability of exploitation activity in the next 30 days.
- EPSS percentile
- Equal to or higher than the score of 93.9% of scored records. A rank, not a probability.
- NVD base score
- 9.8 (CVSS v3.x), scored by the NVD independently of the CNA.
- NVD CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVD analysis status
- Modified. NVD last modified this record on 2026-10-08.
- Red Hat severity
- Moderate. Red Hat's rating for its own products, not a CVSS rating.
Exploit-prediction scores from FIRST. Independent scoring and analysis status from the NVD. Vendor severity from Red Hat. Exploitation assessment and catalog membership from CISA.
04 Metadata
- Published
- 2021-05-06 00:00Z5 YR AGO
- Last updated
- 2026-10-08 21:13Z20 DAYS AGO
- Reserved
- 2021-04-01
- Assigning CNA
- mitre
- Record state
- PUBLISHED
- Severity
- Not rated by the issuing CNA
- CNA CVSS vector
- Not published by the issuing CNA
- Weaknesses
- No CWE assigned
- Data version
- 5.2
- Document digest
- 29b2db1bd1cf324e53a9b517f655b4d814e667ba0dab4131e97c1add4e634636
05 Affected products
06 References
- github.comhttps://github.com/sickcodes
- 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
- sick.codeshttps://sick.codes/sick-2021-014
- www.oracle.comhttps://www.oracle.com//security-alerts/cpujul2021.html
- 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
- bugs.python.orghttps://bugs.python.org/issue36384
- github.comhttps://github.com/python/cpython/pull/12577
- github.comhttps://github.com/python/cpython/pull/25099
- security.netapp.comhttps://security.netapp.com/advisory/ntap-20210622-0003/
- www.oracle.comhttps://www.oracle.com/security-alerts/cpuoct2021.html
- www.oracle.comhttps://www.oracle.com/security-alerts/cpujan2022.html
- www.oracle.comhttps://www.oracle.com/security-alerts/cpuapr2022.html
- www.oracle.comhttps://www.oracle.com/security-alerts/cpujul2022.html
- security.gentoo.orgGLSA-202305-02https://security.gentoo.org/glsa/202305-02
- lists.debian.orghttps://lists.debian.org/debian-lts-announce/2024/12/msg00000.html
07 Fixed in
AlmaLinux 8
- python38-Cython Fixed in 0.29.14-4.module_el8.6.0+2778+cd494b30
- python38-PyMySQL Fixed in 0.10.1-1.module_el8.6.0+2778+cd494b30
- python38-asn1crypto Fixed in 1.2.0-3.module_el8.6.0+2778+cd494b30
- python38-atomicwrites Fixed in 1.3.0-8.module_el8.6.0+2778+cd494b30
- python38-attrs Fixed in 19.3.0-3.module_el8.6.0+2778+cd494b30
- python38-babel Fixed in 2.7.0-11.module_el8.6.0+2778+cd494b30
- python38-cffi Fixed in 1.13.2-3.module_el8.6.0+2778+cd494b30
- python38-chardet Fixed in 3.0.4-19.module_el8.6.0+2778+cd494b30
- python38-cryptography Fixed in 2.8-3.module_el8.6.0+2778+cd494b30
- python38-idna Fixed in 2.8-6.module_el8.6.0+2778+cd494b30
- python38-jinja2 Fixed in 2.10.3-5.module_el8.6.0+2778+cd494b30
- python38-markupsafe Fixed in 1.1.1-6.module_el8.6.0+2778+cd494b30
- python38-mod_wsgi Fixed in 4.6.8-3.module_el8.6.0+2778+cd494b30
- python38-more-itertools Fixed in 7.2.0-5.module_el8.6.0+2778+cd494b30
- python38-numpy Fixed in 1.17.3-6.module_el8.6.0+2778+cd494b30
- python38-numpy-doc Fixed in 1.17.3-6.module_el8.6.0+2778+cd494b30
- python38-numpy-f2py Fixed in 1.17.3-6.module_el8.6.0+2778+cd494b30
- python38-packaging Fixed in 19.2-3.module_el8.6.0+2778+cd494b30
- python38-pluggy Fixed in 0.13.0-3.module_el8.6.0+2778+cd494b30
- python38-ply Fixed in 3.11-10.module_el8.6.0+2778+cd494b30
- python38-psutil Fixed in 5.6.4-4.module_el8.6.0+2778+cd494b30
- python38-psycopg2 Fixed in 2.8.4-4.module_el8.6.0+2778+cd494b30
- python38-psycopg2-doc Fixed in 2.8.4-4.module_el8.6.0+2778+cd494b30
- python38-psycopg2-tests Fixed in 2.8.4-4.module_el8.6.0+2778+cd494b30
- python38-py Fixed in 1.8.0-8.module_el8.6.0+2778+cd494b30
- python38-pycparser Fixed in 2.19-3.module_el8.6.0+2778+cd494b30
- python38-pyparsing Fixed in 2.4.5-3.module_el8.6.0+2778+cd494b30
- python38-pysocks Fixed in 1.7.1-4.module_el8.6.0+2778+cd494b30
- python38-pytest Fixed in 4.6.6-3.module_el8.6.0+2778+cd494b30
- python38-pytz Fixed in 2019.3-3.module_el8.6.0+2778+cd494b30
- python38-pyyaml Fixed in 5.4.1-1.module_el8.6.0+2778+cd494b30
- python38-requests Fixed in 2.22.0-9.module_el8.6.0+2778+cd494b30
- python38-scipy Fixed in 1.3.1-4.module_el8.6.0+2778+cd494b30
- python38-setuptools Fixed in 41.6.0-5.module_el8.6.0+2778+cd494b30
- python38-setuptools-wheel Fixed in 41.6.0-5.module_el8.6.0+2778+cd494b30
- python38-six Fixed in 1.12.0-10.module_el8.6.0+2778+cd494b30
- python38-urllib3 Fixed in 1.25.7-5.module_el8.6.0+2778+cd494b30
- python38-wcwidth Fixed in 0.1.7-16.module_el8.6.0+2778+cd494b30
- python38-wheel Fixed in 0.33.6-6.module_el8.6.0+2778+cd494b30
- python38-wheel-wheel Fixed in 0.33.6-6.module_el8.6.0+2778+cd494b30
36 further packages in AlmaLinux 8 not shown (first 40 listed).
Source: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
Arch Linux
- python Fixed in 3.9.5-1
Source: Arch Linux Security Tracker, the Arch Linux security team. Reformatted by exploit.cc.
CloudLinux 8
- python38-Cython Fixed in 0.29.14-4.module_el8.6.0+2778+cd494b30
- python38-PyMySQL Fixed in 0.10.1-1.module_el8.6.0+2778+cd494b30
- python38-asn1crypto Fixed in 1.2.0-3.module_el8.6.0+2778+cd494b30
- python38-atomicwrites Fixed in 1.3.0-8.module_el8.6.0+2778+cd494b30
- python38-attrs Fixed in 19.3.0-3.module_el8.6.0+2778+cd494b30
- python38-babel Fixed in 2.7.0-11.module_el8.6.0+2778+cd494b30
- python38-cffi Fixed in 1.13.2-3.module_el8.6.0+2778+cd494b30
- python38-chardet Fixed in 3.0.4-19.module_el8.6.0+2778+cd494b30
- python38-cryptography Fixed in 2.8-3.module_el8.6.0+2778+cd494b30
- python38-idna Fixed in 2.8-6.module_el8.6.0+2778+cd494b30
- python38-jinja2 Fixed in 2.10.3-5.module_el8.6.0+2778+cd494b30
- python38-markupsafe Fixed in 1.1.1-6.module_el8.6.0+2778+cd494b30
- python38-mod_wsgi Fixed in 4.6.8-3.module_el8.6.0+2778+cd494b30
- python38-more-itertools Fixed in 7.2.0-5.module_el8.6.0+2778+cd494b30
- python38-numpy Fixed in 1.17.3-6.module_el8.6.0+2778+cd494b30
- python38-numpy-doc Fixed in 1.17.3-6.module_el8.6.0+2778+cd494b30
- python38-numpy-f2py Fixed in 1.17.3-6.module_el8.6.0+2778+cd494b30
- python38-packaging Fixed in 19.2-3.module_el8.6.0+2778+cd494b30
- python38-pluggy Fixed in 0.13.0-3.module_el8.6.0+2778+cd494b30
- python38-ply Fixed in 3.11-10.module_el8.6.0+2778+cd494b30
- python38-psutil Fixed in 5.6.4-4.module_el8.6.0+2778+cd494b30
- python38-psycopg2 Fixed in 2.8.4-4.module_el8.6.0+2778+cd494b30
- python38-psycopg2-doc Fixed in 2.8.4-4.module_el8.6.0+2778+cd494b30
- python38-psycopg2-tests Fixed in 2.8.4-4.module_el8.6.0+2778+cd494b30
- python38-py Fixed in 1.8.0-8.module_el8.6.0+2778+cd494b30
- python38-pycparser Fixed in 2.19-3.module_el8.6.0+2778+cd494b30
- python38-pyparsing Fixed in 2.4.5-3.module_el8.6.0+2778+cd494b30
- python38-pysocks Fixed in 1.7.1-4.module_el8.6.0+2778+cd494b30
- python38-pytest Fixed in 4.6.6-3.module_el8.6.0+2778+cd494b30
- python38-pytz Fixed in 2019.3-3.module_el8.6.0+2778+cd494b30
- python38-pyyaml Fixed in 5.4.1-1.module_el8.6.0+2778+cd494b30
- python38-requests Fixed in 2.22.0-9.module_el8.6.0+2778+cd494b30
- python38-scipy Fixed in 1.3.1-4.module_el8.6.0+2778+cd494b30
- python38-setuptools Fixed in 41.6.0-5.module_el8.6.0+2778+cd494b30
- python38-setuptools-wheel Fixed in 41.6.0-5.module_el8.6.0+2778+cd494b30
- python38-six Fixed in 1.12.0-10.module_el8.6.0+2778+cd494b30
- python38-urllib3 Fixed in 1.25.7-5.module_el8.6.0+2778+cd494b30
- python38-wcwidth Fixed in 0.1.7-16.module_el8.6.0+2778+cd494b30
- python38-wheel Fixed in 0.33.6-6.module_el8.6.0+2778+cd494b30
- python38-wheel-wheel Fixed in 0.33.6-6.module_el8.6.0+2778+cd494b30
36 further packages in CloudLinux 8 not shown (first 40 listed).
Derived from AlmaLinux 8. Partial coverage: only packages taken from AlmaLinux 8 are listed.
Source: CloudLinux errata, CloudLinux Inc. Derived from: AlmaLinux, AlmaLinux OS. Copyright (c) 2023 AlmaLinux OS. Licensed under MIT License. Received through OSV.dev. Reformatted by exploit.cc.
Debian 12
- pypy3 Fixed in 7.3.8+dfsg-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Debian 13
- pypy3 Fixed in 7.3.8+dfsg-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Debian 14
- pypy3 Fixed in 7.3.8+dfsg-1
Source: Debian Security Tracker, the Debian security team. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu 20.04 LTS
- python3.8 Fixed in 3.8.10-0ubuntu1~20.04.1
- python3.9 Fixed in 3.9.5-3~20.04.1
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
Ubuntu Pro 18.04 LTS
- python3.8 Fixed in 3.8.0-3ubuntu1~18.04.2+esm2Available with Ubuntu Pro: https://ubuntu.com/pro
Source: Ubuntu, Canonical Ltd. Licensed under CC BY-SA 4.0. Received through OSV.dev. Reformatted by exploit.cc.
A release or ecosystem missing from this list has no record here. It may be unaffected or not covered by the source. Source notices and licences.