CVE-2024-8088 Infinite loop when iterating over zip archive entry names from zipfile.Path
Attackers can cause a denial of service via infinite loop in Python's zipfile.Path when processing malicious archives.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-8088?
CVE-2024-8088 is a high-severity denial of service vulnerability in CPython, published on 22 Aug 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.
Weakness: CWE-835
Which versions are affected by CVE-2024-8088?
3 open source packages ship an affected version, including libpython, python and python-min.
| Package | Affected | Fixed in |
|---|---|---|
libpython Bitnami | All versions | 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6 |
python Bitnami | All versions | 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6 |
python-min Bitnami | All versions | 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6 |
Linux distribution packages (31)
python-unversioned-command AlmaLinux:9 | All versions | 3.9.19-8.el9 |
python3 AlmaLinux:9 | All versions | 3.9.19-8.el9 |
python3-debug AlmaLinux:9 | All versions | 3.9.19-8.el9 |
python3-devel AlmaLinux:9 | All versions | 3.9.19-8.el9 |
python3-idle AlmaLinux:9 | All versions | 3.9.19-8.el9 |
python3-libs AlmaLinux:9 | All versions | 3.9.19-8.el9 |
python3-test AlmaLinux:9 | All versions | 3.9.19-8.el9 |
python3-tkinter AlmaLinux:9 | All versions | 3.9.19-8.el9 |
python-unversioned-command Red Hat:enterprise_linux:9::appstream | All versions | 0:3.9.19-8.el9 |
python3-devel Red Hat:enterprise_linux:9::appstream | All versions | 0:3.9.19-8.el9 |
python3-tkinter Red Hat:enterprise_linux:9::appstream | All versions | 0:3.9.19-8.el9 |
python3.9-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:3.9.19-8.el9 |
python3.9-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:3.9.19-8.el9 |
python3 Red Hat:enterprise_linux:9::baseos | All versions | 0:3.9.19-8.el9 |
python3-libs Red Hat:enterprise_linux:9::baseos | All versions | 0:3.9.19-8.el9 |
python3.9 Red Hat:enterprise_linux:9::baseos | All versions | 0:3.9.19-8.el9 |
python3.9-debuginfo Red Hat:enterprise_linux:9::baseos | All versions | 0:3.9.19-8.el9 |
python3.9-debugsource Red Hat:enterprise_linux:9::baseos | All versions | 0:3.9.19-8.el9 |
python3 Red Hat:enterprise_linux:9::crb | All versions | 0:3.9.19-8.el9 |
python3-debug Red Hat:enterprise_linux:9::crb | All versions | 0:3.9.19-8.el9 |
python3-idle Red Hat:enterprise_linux:9::crb | All versions | 0:3.9.19-8.el9 |
python3-test Red Hat:enterprise_linux:9::crb | All versions | 0:3.9.19-8.el9 |
python3-tkinter Red Hat:enterprise_linux:9::crb | All versions | 0:3.9.19-8.el9 |
python3.9-debuginfo Red Hat:enterprise_linux:9::crb | All versions | 0:3.9.19-8.el9 |
python3.9-debugsource Red Hat:enterprise_linux:9::crb | All versions | 0:3.9.19-8.el9 |
python310 openSUSE:Tumbleweed | All versions | 3.10.14-7.1 |
python311 openSUSE:Tumbleweed | All versions | 3.11.9-7.1 |
python312 openSUSE:Tumbleweed | All versions | 3.12.5-2.1 |
python313 openSUSE:Tumbleweed | All versions | 3.13.0~rc1-3.1 |
python38 openSUSE:Tumbleweed | All versions | 3.8.19-8.1 |
python39 openSUSE:Tumbleweed | All versions | 3.9.19-7.1 |
How do I fix CVE-2024-8088?
Upgrade libpython to a fixed version for your release line: 3.8.20, 3.9.20, 3.10.15 or 3.11.10.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-8088 being exploited?
There is no known exploitation of CVE-2024-8088 in the wild and no public exploit code.
Sources
Also known as ALPINE-CVE-2024-8088, ALSA-2024:9371, AZL-48114, AZL-48125, AZL-48141, BELL-CVE-2024-8088 and 16 more.