Skip to main content
No exploitation reportedFix available

CVE-2021-29921

No exploitation reported by the sources we read.

  • Published2021-05-06
  • Fixed in3.9.5 · 3.8.12

Am I 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
  1. 2021-05-0613:15CVE publishedNVD

Versions per branch

NVD · OSV
Python
BranchAffectedFixed in
3.9≥ 3.9.0, < 3.9.53.9.5
3.8≥ 3.8.0, < 3.8.123.8.12
Oracle graalvm
BranchAffectedFixed in
20.3= 20.3.2no fix published
21.1= 21.1.0no fix published
Oracle communications cloud native core automated test suite
BranchAffectedFixed in
1.8= 1.8.0no fix published

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

  • CVE-2021-29921 Red Hat Product Security594 products fixed

    python-ipaddress: Improper input validation of octal strings

  • RHSA-2021:4160 Red Hat Product Security229 products fixed

    Red Hat Security Advisory: python39:3.9 and python39-devel:3.9 security update

  • RHSA-2021:4162 Red Hat Product Security239 products fixed

    Red Hat Security Advisory: python38:3.8 and python38-devel:3.8 security update

  • RHSA-2021:3254 Red Hat Product Security126 products fixed

    Red Hat Security Advisory: rh-python38 security, bug fix, and enhancement update

Full record on NVD

Fix

  1. Update Python to 3.9.5 · 3.8.12
  2. 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

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

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?

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.

Is CVE-2021-29921 actively exploited?

Active exploitation of CVE-2021-29921 has not been confirmed. Its EPSS score was 6.8% on 2026-12-04, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-29921?

CVE-2021-29921 has a CVSS v3 base score of 9.8 (Critical severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

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

Sources for this record