CVE-2021-29921
CVE-2021-29921 is a critical-severity vulnerability in Python with a CVSS 3.x base score of 9.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- CVSS v2: 7.5
- EPSS exploit prediction: 7% (93rd percentile)
- Actively exploited: Not listed in CISA KEV
- Affected product: Python
- Published:
- Last modified:
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.
Frequently asked questions
- What is 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 based on IP addresses.
- How severe is CVE-2021-29921?
- CVE-2021-29921 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2021-29921 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 7% (93rd percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-29921?
- CVE-2021-29921 primarily affects Python. In total, 7 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2021-29921?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- When was CVE-2021-29921 published?
- CVE-2021-29921 was published on 2021-05-06 and last updated on 2026-06-17.
References
- https://bugs.python.org/issue36384
- https://docs.python.org/3/library/ipaddress.html
- https://github.com/python/cpython/blob/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Misc/NEWS.d/3.8.0a4.rst
- https://github.com/python/cpython/pull/12577
- https://github.com/python/cpython/pull/25099
- https://github.com/sickcodes
- https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-014.md
- https://python-security.readthedocs.io/vuln/ipaddress-ipv4-leading-zeros.html
- https://security.gentoo.org/glsa/202305-02
- https://security.netapp.com/advisory/ntap-20210622-0003/
- https://sick.codes/sick-2021-014
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujan2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html
Affected products (7)
- cpe:2.3:a:python:python:*:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:communications_cloud_native_core_automated_test_suite:1.8.0:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:communications_cloud_native_core_binding_support_function:1.11.0:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:communications_cloud_native_core_network_slice_selection_function:1.8.0:*:*:*:*:*:*:*
- cpe:2.3:a:oracle:graalvm:20.3.2:*:*:*:enterprise:*:*:*
- cpe:2.3:a:oracle:graalvm:21.1.0:*:*:*:enterprise:*:*:*
- cpe:2.3:a:oracle:zfs_storage_appliance_kit:8.8:*:*:*:*:*:*:*
More vulnerabilities in Python
- CVE-2008-5031 — Critical (CVSS 10.0): Multiple integer overflows in Python 2.2.3 through 2.5.1, and 2.6, allow context-dependent attackers to have an unknown…
- CVE-2022-48565 — Critical (CVSS 9.8): An XML External Entity (XXE) issue was discovered in Python through 3.9.1. The plistlib module no longer accepts entity…
- CVE-2022-37454 — Critical (CVSS 9.8): The Keccak XKCP SHA-3 reference implementation before fdc6fef has an integer overflow and resultant buffer overflow…
- CVE-2021-3177 — Critical (CVSS 9.8): Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code…
- CVE-2020-27619 — Critical (CVSS 9.8): In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via…
- CVE-2020-15801 — Critical (CVSS 9.8): In Python 3.8.4, sys.path restrictions specified in a python38._pth file are ignored, allowing code to be loaded from…
Threat intelligence
Threat-intel indicators referencing this CVE:
- 141.109.168.26 (ipv4-addr)
- 141.109.168.107 (ipv4-addr)
- 139.59.183.60 (ipv4-addr)
- 84.247.136.70 (ipv4-addr)
- 160.202.46.190 (ipv4-addr)
- 41.216.182.77 (ipv4-addr)