CVE-2024-8088 Infinite loop when iterating over zip archive entry names from zipfile.Path

High 8.7 Published Updated

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.

PackageAffectedFixed in
libpython BitnamiAll versions3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6
python BitnamiAll versions3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6
python-min BitnamiAll versions3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.6
Linux distribution packages (31)
python-unversioned-command AlmaLinux:9All versions3.9.19-8.el9
python3 AlmaLinux:9All versions3.9.19-8.el9
python3-debug AlmaLinux:9All versions3.9.19-8.el9
python3-devel AlmaLinux:9All versions3.9.19-8.el9
python3-idle AlmaLinux:9All versions3.9.19-8.el9
python3-libs AlmaLinux:9All versions3.9.19-8.el9
python3-test AlmaLinux:9All versions3.9.19-8.el9
python3-tkinter AlmaLinux:9All versions3.9.19-8.el9
python-unversioned-command Red Hat:enterprise_linux:9::appstreamAll versions0:3.9.19-8.el9
python3-devel Red Hat:enterprise_linux:9::appstreamAll versions0:3.9.19-8.el9
python3-tkinter Red Hat:enterprise_linux:9::appstreamAll versions0:3.9.19-8.el9
python3.9-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:3.9.19-8.el9
python3.9-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:3.9.19-8.el9
python3 Red Hat:enterprise_linux:9::baseosAll versions0:3.9.19-8.el9
python3-libs Red Hat:enterprise_linux:9::baseosAll versions0:3.9.19-8.el9
python3.9 Red Hat:enterprise_linux:9::baseosAll versions0:3.9.19-8.el9
python3.9-debuginfo Red Hat:enterprise_linux:9::baseosAll versions0:3.9.19-8.el9
python3.9-debugsource Red Hat:enterprise_linux:9::baseosAll versions0:3.9.19-8.el9
python3 Red Hat:enterprise_linux:9::crbAll versions0:3.9.19-8.el9
python3-debug Red Hat:enterprise_linux:9::crbAll versions0:3.9.19-8.el9
python3-idle Red Hat:enterprise_linux:9::crbAll versions0:3.9.19-8.el9
python3-test Red Hat:enterprise_linux:9::crbAll versions0:3.9.19-8.el9
python3-tkinter Red Hat:enterprise_linux:9::crbAll versions0:3.9.19-8.el9
python3.9-debuginfo Red Hat:enterprise_linux:9::crbAll versions0:3.9.19-8.el9
python3.9-debugsource Red Hat:enterprise_linux:9::crbAll versions0:3.9.19-8.el9
python310 openSUSE:TumbleweedAll versions3.10.14-7.1
python311 openSUSE:TumbleweedAll versions3.11.9-7.1
python312 openSUSE:TumbleweedAll versions3.12.5-2.1
python313 openSUSE:TumbleweedAll versions3.13.0~rc1-3.1
python38 openSUSE:TumbleweedAll versions3.8.19-8.1
python39 openSUSE:TumbleweedAll versions3.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.

Is CVE-2024-8088 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free