CyberSecBulletin
CVE-2024-4032NVD status: Deferred

CPython: Incorrect Comparison

CVE-2024-4032 is a high-severity incorrect comparison vulnerability in CPython from Python Software Foundation, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 3.8.20, 3.9.20, 3.10.15 as the first without the flaw, so updating CPython to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 1.08% chance of exploitation within 30 days, higher than 66% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update CPython to 3.8.20 or 3.9.20 or 3.10.15 or 3.11.10, whichever matches your release line, or a later version.
  2. Update cpython to 3.12.4 or 3.13.0a6, whichever matches your release line, or a later version.
  3. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
Python Software FoundationCPythonbefore 3.8.20; 3.9.0 up to, but not including, 3.9.20; 3.10.0 up to, but not including, 3.10.15; 3.11.0 up to, but not including, 3.11.10; 3.12.0 up to, but not including, 3.12.4; 3.13.0a1 up to, but not including, 3.13.0a63.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.4, 3.13.0a6
Pythoncpythonbefore 3.12.4; 3.13.0a1 up to, but not including, 3.13.0a63.12.4, 3.13.0a6

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
NoneNo account or login is needed.
User interaction
NoneNo action by a victim is required.
Scope
UnchangedImpact stays within the vulnerable component.
Confidentiality
HighAll data handled by the component can be read.
Integrity
NoneNothing can be modified.
Availability
NoneAvailability is not affected.

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N. Scored by CISA (ADP).

Official 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.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Incorrect Comparison

The product compares two entities in a security-relevant context, but the comparison is incorrect.

More Incorrect Comparison vulnerabilities (CWE-697)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Other vulnerabilities in CPython

All CPython vulnerabilities

Recent Incorrect Comparison vulnerabilities

Spotted an error? Tell us.