9.8critical
ipaddress leading zeros in IPv4 address
- Severity
- 9.8critical CVSS:3.1 by NVD
- Exploit likelihood
- 6.82% (higher than 94% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- PSF-2021-2BIT-LIBPYTHON-2021-29921BIT-PYTHON-2021-29921BIT-PYTHON-MIN-2021-29921
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
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| https://github.com/python/cpython | before 03dd89d62413c4a92831ed1b36e2ae8983bcb2d4, before 5374fbc31446364bf5f12e5ab88c5493c35eaf04, before 60ce8f0be6354ad565393ab449d8de5d713f35bc | Python Software Foundation |
| python python | from 3.8.0 before 3.8.12, from 3.9.0 before 3.9.5 | NVD |
| oracle communications_cloud_native_core_automated_test_suite | 1.8.0 | NVD |
| oracle communications_cloud_native_core_binding_support_function | 1.11.0 | NVD |
| oracle communications_cloud_native_core_network_slice_selection_function | 1.8.0 | NVD |
| oracle graalvm | 20.3.2, 21.1.0 | NVD |
| oracle zfs_storage_appliance_kit | 8.8 | NVD |
| libpython (Bitnami) | from 3.8.0 before 3.8.12, from 3.9.0 before 3.9.5 | Bitnami Vulnerability Database |
| python (Bitnami) | from 3.8.0 before 3.8.12, from 3.9.0 before 3.9.5 | Bitnami Vulnerability Database |
| python-min (Bitnami) | from 3.8.0 before 3.8.12, from 3.9.0 before 3.9.5 | Bitnami Vulnerability Database |
All scores
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| Bitnami Vulnerability Database | critical rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.
What each source says
CVE List
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.
NVD (es)
En Python antes de la versiones 3,9,5, la biblioteca ipaddress maneja mal los caracteres cero iniciales en los octetos de una cadena de direcciones IP. Esto (en algunas situaciones) permite a los atacantes eludir el control de acceso que se basa en las direcciones IP
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-29921 changed 2026-10-08 | CVE Terms of Use |
| Python Software Foundation | PSF-2021-2 changed 2025-10-09 | CC-BY-4.0 |
| NVD | CVE-2021-29921 changed 2026-10-08 | Public domain |
| Bitnami Vulnerability Database | BIT-LIBPYTHON-2021-29921 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PYTHON-2021-29921 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PYTHON-MIN-2021-29921 changed 2026-09-08 | Apache-2.0 |