CVE-2024-4032
Incorrect IPv4 and IPv6 private ranges
Check your servers for CVE-2024-4032
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-4032 affects cpython, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
The “ipaddress” module contained incorrect information about whether certain IPv4 and IPv6 addresses were designated as “globally reachable” or “private”. This affected the is_private and is_global properties of the ipaddress.IPv4Address, ipaddress.IPv4Network, ipaddress.IPv6Address, and ipaddress.IPv6Network classes, where values wouldn’t be returned in accordance with the latest information from the IANA Special-Purpose Address Registries.
CPython 3.12.4 and 3.13.0a6 contain updated information from these registries and thus have the intended behavior.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity none, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.58%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 75.8% of all scored CVEs. Scores of 29 Nov 2026.
The assessment of CISA (SSVC, 8 Aug 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-697 Incorrect Comparison
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| CPython |
affected before 3.8.20 affected from 3.9.0, before 3.9.20 affected from 3.10.0, before 3.10.15 affected from 3.11.0, before 3.11.10 affected from 3.12.0, before 3.12.4 affected from 3.13.0a1, before 3.13.0a6
Other versions: unaffected
|
Is my server affected?
Find the installed version of cpython and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i cpython
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2024-4032 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2024-4032RHEL, Rocky, Alma, Fedora
rpm -q cpython
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2024-4032Alpine
apk list --installed | grep -i cpythonWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-4032
trivy image --scanners vuln IMAGE | grep CVE-2024-4032
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://mail.python.org/archives/list/security-announce@python.org/thread/NRUHDUS2IV2USIZM2CVMSFL6SCKU3RZA/ mail.python.org · vendor advisory
Patches and release notes
- https://github.com/python/cpython/pull/113179 github.com · patch
- https://github.com/python/cpython/commit/22adf29da8d99933ffed8647d3e0726edd16f7f8 github.com · patch
- https://github.com/python/cpython/commit/40d75c2b7f5c67e254d0a025e0f2e2c7ada7f69f github.com · patch
- https://github.com/python/cpython/commit/895f7e2ac23eff4743143beef0f0c5ac71ea27d3 github.com · patch
- https://github.com/python/cpython/commit/ba431579efdcbaed7a96f2ac4ea0775879a332fb github.com · patch
- https://github.com/python/cpython/commit/c62c9e518b784fe44432a3f4fc265fb95b651906 github.com · patch
- https://github.com/python/cpython/commit/f86b17ac511e68192ba71f27e752321a3252cee3 github.com · patch
Other references
- https://github.com/python/cpython/issues/113171 github.com · issue tracking
- https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml iana.org
- https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml iana.org
- http://www.openwall.com/lists/oss-security/2024/06/17/3 openwall.com
- https://security.netapp.com/advisory/ntap-20240726-0004/ security.netapp.com
- https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html lists.debian.org
Source: the record CVE-2024-4032 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse