CVE-2021-29921
Summary
| CVE | CVE-2021-29921 |
|---|---|
| State | PUBLISHED |
| Assigner | mitre |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2021-05-06 13:15:12 UTC |
| Updated | 2026-10-08 22:17:09 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 9.8 CRITICAL from [email protected]
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Problem Types: NVD-CWE-Other | n/a
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 9.8 | CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| 2.0 | [email protected] | Primary | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v2.0 Breakdown
Access Vector
NetworkAccess Complexity
LowAuthentication
NoneConfidentiality
PartialIntegrity
PartialAvailability
PartialAV:N/AC:L/Au:N/C:P/I:P/A:P
NVD Known Affected Configurations (CPE 2.3)
Vendor Declared Affected Products
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| Oracle Critical Patch Update Advisory - April 2022 | af854a3a-2127-422b-91ae-364da2661108 | www.oracle.com | Patch, Third Party Advisory |
| ipaddress leading zeros in IPv4 address — Python Security 0.0 documentation | af854a3a-2127-422b-91ae-364da2661108 | python-security.readthedocs.io | Vendor Advisory |
| Oracle Critical Patch Update Advisory - October 2021 | af854a3a-2127-422b-91ae-364da2661108 | www.oracle.com | Patch, Third Party Advisory |
| Issue 36384: [security] CVE-2021-29921: ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal - Python tracker | af854a3a-2127-422b-91ae-364da2661108 | bugs.python.org | Issue Tracking, Patch, Vendor Advisory |
| Oracle Critical Patch Update Advisory - July 2021 | af854a3a-2127-422b-91ae-364da2661108 | www.oracle.com | Patch, Third Party Advisory |
| sickcodes (sickcodes) · GitHub | af854a3a-2127-422b-91ae-364da2661108 | github.com | Third Party Advisory |
| lists.debian.org/debian-lts-announce/2024/12/msg00000.html | af854a3a-2127-422b-91ae-364da2661108 | lists.debian.org | |
| CVE-2021-29921 - python stdlib "ipaddress" - Improper Input Validation of octal literals in python 3.8.0 thru v3.10 results in indeterminate SSRF & RFI vulnerabilities. - "ipaddress leading zeros in IPv4 address" - Sick Codes - Security Research, Hardware & Software Hacking, Consulting, Linux, IoT, Cloud, Embedded, Arch, Tweaks & Tips! | af854a3a-2127-422b-91ae-364da2661108 | sick.codes | Exploit, Third Party Advisory |
| cpython/3.8.0a4.rst at 63298930fb531ba2bb4f23bc3b915dbf1e17e9e1 · python/cpython · GitHub | af854a3a-2127-422b-91ae-364da2661108 | github.com | Third Party Advisory |
| ipaddress — IPv4/IPv6 manipulation library — Python 3.9.4 documentation | af854a3a-2127-422b-91ae-364da2661108 | docs.python.org | Vendor Advisory |
| Oracle Critical Patch Update Advisory - January 2022 | af854a3a-2127-422b-91ae-364da2661108 | www.oracle.com | Patch, Third Party Advisory |
| Oracle Critical Patch Update Advisory - July 2022 | af854a3a-2127-422b-91ae-364da2661108 | www.oracle.com | |
| bpo-36384: Leading zeros in IPv4 addresses are no longer tolerated by tiran · Pull Request #25099 · python/cpython · GitHub | af854a3a-2127-422b-91ae-364da2661108 | github.com | Patch, Third Party Advisory |
| Python, PyPy3: Multiple Vulnerabilities (GLSA 202305-02) — Gentoo security | af854a3a-2127-422b-91ae-364da2661108 | security.gentoo.org | |
| security/SICK-2021-014.md at master · sickcodes/security · GitHub | af854a3a-2127-422b-91ae-364da2661108 | github.com | Exploit, Third Party Advisory |
| CVE-2021-29921 Python Vulnerability in NetApp Products | NetApp Product Security | af854a3a-2127-422b-91ae-364da2661108 | security.netapp.com | Third Party Advisory |
| bpo-36384: Remove check for leading zeroes in IPv4 addresses by TV4Fun · Pull Request #12577 · python/cpython · GitHub | af854a3a-2127-422b-91ae-364da2661108 | github.com | Patch, Third Party Advisory |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Legacy QID Mappings
- 159466 Oracle Enterprise Linux Security Update for python39:3.9 and python39-devel:3.9 (ELSA-2021-4160)
- 159467 Oracle Enterprise Linux Security Update for python38:3.8 and python38-devel:3.8 (ELSA-2021-4162)
- 198392 Ubuntu Security Notification for Python vulnerability (USN-4973-1)
- 198529 Ubuntu Security Notification for Python Vulnerability (USN-4973-2)
- 239580 Red Hat Update for rh-python38 (RHSA-2021:3254)
- 239841 Red Hat Update for python39:3.9 and python39-devel:3.9 (RHSA-2021:4160)
- 239845 Red Hat Update for python38:3.8 and python38-devel:3.8 (RHSA-2021:4162)
- 296068 Oracle Solaris 11.4 Support Repository Update (SRU) 34.94.4 Missing (CPUAPR2021)
- 356244 Amazon Linux Security Advisory for python38 : ALASPYTHON3.8-2023-009
- 375538 Python3 RFI/SSRF Vulnerability
- 502021 Alpine Linux Security Update for python3
- 504347 Alpine Linux Security Update for python3
- 672336 EulerOS Security Update for python-pip (EulerOS-SA-2022-2740)
- 672356 EulerOS Security Update for python-pip (EulerOS-SA-2022-2775)
- 672442 EulerOS Security Update for python-pip (EulerOS-SA-2022-2854)
- 672444 EulerOS Security Update for python-pip (EulerOS-SA-2022-2828)
- 710714 Gentoo Linux Python, PyPy3 Multiple Vulnerabilities (GLSA 202305-02)
- 751095 OpenSUSE Security Update for python39 (openSUSE-SU-2021:2940-1)
- 940526 AlmaLinux Security Update for python38:3.8 and python38-devel:3.8 (ALSA-2021:4162)
- 940559 AlmaLinux Security Update for python39:3.9 and python39-devel:3.9 (ALSA-2021:4160)
- 960239 Rocky Linux Security Update for python39:3.9 and python39-devel:3.9 (RLSA-2021:4160)
- 960342 Rocky Linux Security Update for python38:3.8 and python38-devel:3.8 (RLSA-2021:4162)