CPython: Loop with Unreachable Exit Condition
CVE-2024-8088 is a high-severity loop with unreachable exit condition vulnerability in CPython from Python Software Foundation, with a CVSS 4.0 base score of 8.7 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.27% chance of exploitation within 30 days, higher than 70% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- 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.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Python Software Foundation | CPython | before 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.6; 3.13.0a1 up to, but not including, 3.13.0rc2; 3.13.0 and earlier | 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6, 3.13.0rc2 |
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.
- Attack requirements
- NoneThe attack does not depend on a particular deployment or configuration.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Confidentiality (vulnerable system)
- NoneNo loss of confidentiality on the vulnerable system.
- Integrity (vulnerable system)
- NoneNo loss of integrity on the vulnerable system.
- Availability (vulnerable system)
- HighSerious loss of availability on the vulnerable system.
- Confidentiality (other systems)
- NoneNo loss of confidentiality on systems beyond the vulnerable one.
- Integrity (other systems)
- NoneNo loss of integrity on systems beyond the vulnerable one.
- Availability (other systems)
- NoneNo loss of availability on systems beyond the vulnerable one.
Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:N/AU:N/R:U/V:X/RE:L/U:X. Scored by CNA (python.org).
Official description
There is a HIGH severity vulnerability affecting the CPython "zipfile" module affecting "zipfile.Path". Note that the more common API "zipfile.ZipFile" class is unaffected. When iterating over names of entries in a zip archive (for example, methods of "zipfile.Path" like "namelist()", "iterdir()", etc) the process can be put into an infinite loop with a maliciously crafted zip archive. This defect applies when reading only metadata or extracting the contents of the zip archive. Programs that are not handling user-controlled zip archives are not affected.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Loop with Unreachable Exit Condition
The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.
More Loop with Unreachable Exit Condition vulnerabilities (CWE-835)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/python/cpython/commit/0aa1ee22ab6e204e9d3d0e9dd63ea648ed691ef1
- github.com/python/cpython/commit/2231286d78d328c2f575e0b05b16fe447d1656d6
- github.com/python/cpython/commit/795f2597a4be988e2bb19b69ff9958e981cb894e
- github.com/python/cpython/commit/7bc367e464ce50b956dd232c1dfa1cad4e7fb814
- github.com/python/cpython/commit/7e8883a3f04d308302361aeffc73e0e9837f19d4
- github.com/python/cpython/commit/8c7348939d8a3ecd79d630075f6be1b0c5b41f64
- github.com/python/cpython/commit/95b073bddefa6243effa08e131e297c0383e7f6a
- github.com/python/cpython/commit/962055268ed4f2ca1d717bfc8b6385de50a23ab7
- github.com/python/cpython/commit/9cd03263100ddb1657826cc4a71470786cab3932
- github.com/python/cpython/commit/dcc5182f27c1500006a1ef78e10613bb45788dea
- github.com/python/cpython/commit/e0264a61119d551658d9445af38323ba94fc16db
- github.com/python/cpython/commit/fc0b8259e693caa8400fa8b6ac1e494e47ea7798
- github.com/python/cpython/pull/122906
Other references
- github.com/python/cpython/issues/122905
- github.com/python/cpython/issues/123270
- mail.python.org/archives/list/[email protected]/thread/GNFCKVI4TCATKQLALJ5SN4L4CSPSMILU/
- openwall.com/lists/oss-security/2024/08/22/1
- openwall.com/lists/oss-security/2024/08/22/4
- openwall.com/lists/oss-security/2024/08/23/1
- openwall.com/lists/oss-security/2024/08/23/2
- lists.debian.org/debian-lts-announce/2024/12/msg00000.html
- security.netapp.com/advisory/ntap-20241011-0010/
Other vulnerabilities in CPython
- 8.2 High severity
- 9.4 Critical severity
- 7.6 High severity
- 9.2 Critical severity
- 8.4 High severity
- 7.5 High severity
Recent Loop with Unreachable Exit Condition vulnerabilities
- 9.1 Critical severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 8.6 High severity
Cisco ASA and FTD Denial of Service Exploited
Spotted an error? Tell us.