CVE-2021-29921
No exploitation reported by the sources we read.
- Published2021-05-06
- Fixed in3.9.5 · 3.8.12
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2021-05-0613:15CVE publishedNVD
Versions per branch
NVD · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.9 | ≥ 3.9.0, < 3.9.5 | 3.9.5 | NVD · OSV |
| 3.8 | ≥ 3.8.0, < 3.8.12 | 3.8.12 | NVD · OSV |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 20.3 | = 20.3.2 | no fix published | NVD |
| 21.1 | = 21.1.0 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 1.8 | = 1.8.0 | no fix published | NVD |
3 more products in the sources.
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- babelRocky Linux:8all versions · fixed in 0:2.7.0-11.module+el8.5.0+672+ab6eb015
- babelRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:2.7.0-11.module+el8.5.0+11015+9c1c7c42and 1 other package
- CythonRocky Linux:8all versions · fixed in 0:0.29.14-4.module+el8.4.0+570+c2eaf144
- CythonRocky Linux:8all versions · fixed in 0:0.29.21-5.module+el8.4.0+574+843c4898
- CythonRed Hat:enterprise_linux:8::crball versions · fixed in 0:0.29.21-5.module+el8.4.0+9822+20bf1249and 3 other packages
- CythonRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:0.29.14-4.module+el8.4.0+8888+89bc7e79and 3 other packages
- mod_wsgiRocky Linux:8all versions · fixed in 0:4.6.8-3.module+el8.4.0+570+c2eaf144
- mod_wsgiRocky Linux:8all versions · fixed in 0:4.7.1-4.module+el8.4.0+574+843c4898
248 more package ranges on OSV.dev
Vendor advisories
python-ipaddress: Improper input validation of octal strings
Red Hat Security Advisory: python39:3.9 and python39-devel:3.9 security update
Red Hat Security Advisory: python38:3.8 and python38-devel:3.8 security update
Red Hat Security Advisory: rh-python38 security, bug fix, and enhancement update
Fix
- Update Python to 3.9.5 · 3.8.12
- Vendor fix Red Hat Product Security RHSA-2021:4160 · 229 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
Advisories and patches
- bugs.python.orgPatch · Vendor Advisory
- docs.python.orgVendor Advisory
- github.comPatch
- github.comPatch
- python-security.readthedocs.ioVendor Advisory
- www.oracle.comPatch
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-12-04
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2026-10-08
- NVDCVSS 3.19.8read 2026-10-23
- NVDCVSS 2.07.5read 2026-10-23
- FIRST EPSSEPSS score6.8 %2026-12-04
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- BIT-libpython-2021-29921same flawBitnami · Apache-2.0
- BIT-python-2021-29921same flawBitnami · Apache-2.0
- BIT-python-min-2021-29921same flawBitnami · Apache-2.0
- EUVD-2021-16395same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-cxqv-r2cc-r9c9same flawGitHub Advisory Database · CC-BY-4.0
- JLSEC-2026-1608same flawJulia Security Advisories · CC-BY-4.0
- PSF-2021-2same flawPython Software Foundation · CC-BY-4.0
- ALSA-2021:4160advisory covering several CVEsAlmaLinux · MIT
- ALSA-2021:4162advisory covering several CVEsAlmaLinux · MIT
- DLA-3980-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2021-0386advisory covering several CVEsMageia · LicenseRef-unstated
- openSUSE-SU-2024:11286-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2021:3254advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:4160advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:4162advisory covering several CVEsRed Hat · CC-BY-4.0
- RLSA-2021:4160advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2021:4162advisory covering several CVEsRocky Linux · BSD-3-Clause
- SUSE-SU-2021:2940-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-4973-1advisory covering several CVEsUbuntu
- USN-4973-2advisory covering several CVEsUbuntu
- USN-6891-1advisory covering several CVEsUbuntu
Technical details
- CVSS v3 vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Published
- 2021-05-06
- Last modified
- 2026-10-08
- NVD status
- Modified
- GitHub advisory
- GHSA-cxqv-r2cc-r9c9
Frequently asked questions
What is CVE-2021-29921?
Is CVE-2021-29921 actively exploited?
What is the CVSS score for CVE-2021-29921?
Running Python? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website checks · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-cxqv-r2cc-r9c9
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0