← Vulnerability feed

Vulnerability record · CVE-2021-29921 · published 6 May 2021

CVE-2021-29921: Python vulnerability

Python · Python

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.

9.8 CVSS 3.1 Critical EPSS 6.9% · top 6.2%
9.8CVSS 3.1 base score, v2 7.5
6.9%EPSS exploitation probability, 30 days
NoNot in CISA KEV
6Affected product versions listed by NVD
33References, 4 tagged exploit
17 Jun 2026Last modified by NVD

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

6 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
https://bugs.python.org/issue36384 Issue TrackingPatchVendor 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 PatchThird Party Advisory
https://github.com/python/cpython/pull/25099 PatchThird Party Advisory
https://github.com/sickcodes Third Party Advisory
https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-014.md ExploitThird 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 ExploitThird Party Advisory
https://www.oracle.com//security-alerts/cpujul2021.html PatchThird Party Advisory
https://www.oracle.com/security-alerts/cpuapr2022.html PatchThird Party Advisory
https://www.oracle.com/security-alerts/cpujan2022.html PatchThird Party Advisory
https://www.oracle.com/security-alerts/cpujul2022.html
https://www.oracle.com/security-alerts/cpuoct2021.html PatchThird Party Advisory
https://bugs.python.org/issue36384 Issue TrackingPatchVendor 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 PatchThird Party Advisory
https://github.com/python/cpython/pull/25099 PatchThird Party Advisory
https://github.com/sickcodes Third Party Advisory
https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-014.md ExploitThird Party Advisory
https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html
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 ExploitThird Party Advisory
https://www.oracle.com//security-alerts/cpujul2021.html PatchThird Party Advisory
https://www.oracle.com/security-alerts/cpuapr2022.html PatchThird Party Advisory
https://www.oracle.com/security-alerts/cpujan2022.html PatchThird Party Advisory
https://www.oracle.com/security-alerts/cpujul2022.html
https://www.oracle.com/security-alerts/cpuoct2021.html PatchThird Party Advisory

Track CVE-2021-29921 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2022-22947Spring Cloud Gateway Actuator endpoint code injectionSpring Cloud Gateway versions before 3.1.1+ and 3.0.7+ allow code injection when the Gateway Actuator endpoint is enabled, exposed and unsecured. A c…KEVEPSS 98%analysed9.8CVE-2022-22963Spring Cloud Function routing expression SpEL injection RCESpring Cloud Function versions 3.1.6, 3.2.2 and older unsupported versions allow a user to supply a crafted SpEL expression as a routing-expression w…KEVEPSS 100%analysed9.8CVE-2022-22965Spring Framework data binding remote code execution (Spring4Shell)Spring MVC and Spring WebFlux applications on JDK 9+ can be exploited through data binding to achieve remote code execution. The known exploit path r…KEVEPSS 100%analysed9.8CVE-2017-1000353Jenkins CLI Java deserialization allows unauthenticated remote code executionJenkins 2.56 and earlier, and 2.46.1 LTS and earlier, deserialize attacker-supplied Java SignedObject data sent to the Jenkins CLI, bypassing the exi…KEVEPSS 100%analysed9.0CVE-2021-40438Apache HTTP Server mod_proxy SSRF via crafted URI pathA crafted request URI path can make mod_proxy forward the request to an origin server chosen by the remote user, an SSRF flaw in Apache HTTP Server 2…KEVEPSS 100%analysed8.8CVE-2023-41993Apple WebKit improper check allows arbitrary code executionCVE-2023-41993 is a WebKit flaw where processing web content can lead to arbitrary code execution, addressed with improved checks. Apple states it is…KEVEPSS 24%analysed8.5CVE-2021-39144XStream deserialization allows remote command executionXStream, a Java library that serializes objects to and from XML, can execute host commands when a remote attacker with sufficient rights manipulates …KEVEPSS 98%analysed7.8CVE-2021-4034polkit pkexec argument handling flaw allows local root escalationpkexec, the setuid polkit utility for running commands as privileged users, mishandles the calling parameter count and ends up treating environment v…KEVEPSS 94%analysed

Source: NIST National Vulnerability Database (record CVE-2021-29921), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.