CVE-2021-29921

Exp

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-06 Last update: 2026-06-16 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-29921 is rated High Exploit Risk (86.8/100): CVSS Critical severity, with high exploitation likelihood (EPSS 6.83%, 93th percentile). Core evidence: 2 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2021-29921

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2021-29921

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-19 6.88% 6.83% -0.06%
2 2026-06-15 2.05% 6.88% +4.83%
3 2026-01-27 2.05%

Full EPSS history (42 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-29921

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]
7.5 2.0 HIGH
AV:N/AC:L/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:L)
Exploitation conditions are straightforward and predictable.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
10.0 6.4 [email protected]

Weakness enumeration for CVE-2021-29921

OS Trackers for CVE-2021-29921

vendor priority summary link
alpine CVE-2021-29921: 1 source package rows (python3); 7 state rows across 7 repos (3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 7, open 0. https://security.alpinelinux.org/vuln/CVE-2021-29921
debian unimportant CVE-2021-29921 unimportant priority: Debian including 3 source packages (pypy3, python2.7, python3.9), 7 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 7. https://security-tracker.debian.org/tracker/CVE-2021-29921
gentoo high CVE-2021-29921: 1 GLSA(s) (202305-02), 2 atom(s) (dev-lang/python, dev-python/pypy3); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-29921
redhat medium https://access.redhat.com/security/cve/CVE-2021-29921
suse high CVE-2021-29921 severity important: SUSE including 43 source package names (3.9.20-50.2:libpython3_9-1_0-3.9.6-4.3.3, 3.9.20-50.2:python39-3.9.6-4.3.4, …), 376 product×package rows across 60 product lines (Container bci/python, Container containers/python, … (60 product lines)): Known Not Affected 274, Fixed 102. https://www.suse.com/security/cve/CVE-2021-29921/
ubuntu medium CVE-2021-29921 medium priority: Ubuntu including 8 source packages (python2.7, python3.10, …), 104 status rows across 13 suites (bionic, focal, groovy, hirsute, impish, jammy, kinetic, lunar, mantic, noble, trusty, upstream, xenial): DNE 71, not-affected 17, needs-triage 8, released 8. https://ubuntu.com/security/CVE-2021-29921

Affected software / configurations for CVE-2021-29921

Vendor Product Version Raw CPE
python python >= 3.8.0, < 3.8.12 cpe:2.3:a:python:python:*:*:*:*:*:*:*:*
python python >= 3.9.0, < 3.9.5 cpe:2.3:a:python:python:*:*:*:*:*:*:*:*
oracle communications_cloud_native_core_automated_test_suite 1.8.0 cpe:2.3:a:oracle:communications_cloud_native_core_automated_test_suite:1.8.0:*:*:*:*:*:*:*
oracle communications_cloud_native_core_binding_support_function 1.11.0 cpe:2.3:a:oracle:communications_cloud_native_core_binding_support_function:1.11.0:*:*:*:*:*:*:*
oracle communications_cloud_native_core_network_slice_selection_function 1.8.0 cpe:2.3:a:oracle:communications_cloud_native_core_network_slice_selection_function:1.8.0:*:*:*:*:*:*:*
oracle graalvm 20.3.2 cpe:2.3:a:oracle:graalvm:20.3.2:*:*:*:enterprise:*:*:*
oracle graalvm 21.1.0 cpe:2.3:a:oracle:graalvm:21.1.0:*:*:*:enterprise:*:*:*
oracle zfs_storage_appliance_kit 8.8 cpe:2.3:a:oracle:zfs_storage_appliance_kit:8.8:*:*:*:*:*:*:*

References for CVE-2021-29921

URL Tags
https://bugs.python.org/issue36384 Issue Tracking Patch Vendor Advisory
https://docs.python.org/3/library/ipaddress.html Vendor Advisory
https://github.com/python/cpython/blob/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Misc/NEWS.d/3.8.0a4.rst Third Party Advisory
https://github.com/python/cpython/pull/12577 Patch Third Party Advisory
https://github.com/python/cpython/pull/25099 Patch Third Party Advisory
https://github.com/sickcodes Third Party Advisory
https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-014.md Exploit Third Party Advisory
https://python-security.readthedocs.io/vuln/ipaddress-ipv4-leading-zeros.html Vendor Advisory
https://security.gentoo.org/glsa/202305-02
https://security.netapp.com/advisory/ntap-20210622-0003/ Third Party Advisory
https://sick.codes/sick-2021-014 Exploit Third Party Advisory
https://www.oracle.com//security-alerts/cpujul2021.html Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpuapr2022.html Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpujan2022.html Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpujul2022.html
https://www.oracle.com/security-alerts/cpuoct2021.html Patch Third Party Advisory
https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html
cvelogic Threat Intelligence