# CVE-2024-0450: Quoted zip-bomb protection for zipfile

> Attackers can cause denial of service in applications using the Python zipfile module by submitting crafted zip archives with high compression ratios.

- **Severity:** Medium 6.2 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Mar 2024
- **Updated:** 3 Nov 2025
- **Also known as:** ALPINE-CVE-2024-0450, ALSA-2024:4243, AZL-36894, AZL-42573, BIT-libpython-2024-0450, BIT-python-2024-0450, BIT-python-min-2024-0450, CLSA-2024-1720178375, CLSA-2024-1720772189, CLSA-2024-1723482251, CLSA-2024-1724259346, CLSA-2024-1724260328, CLSA-2024-1734642829, DEBIAN-CVE-2024-0450, DLA-3771-1, GHSA-jm46-725r-hh9v, OESA-2024-2141, PSF-2024-2, RHSA-2024:4243, RLSA-2024:4243, SUSE-SU-2024:1843-1, SUSE-SU-2024:1844-1, UBUNTU-CVE-2024-0450, openSUSE-SU-2024:13794-1, openSUSE-SU-2024:13983-1

## What is CVE-2024-0450?

CVE-2024-0450 is a medium-severity denial of service vulnerability in CPython, published on 19 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

An issue was found in the CPython `zipfile` module affecting versions 3.12.1, 3.11.7, 3.10.13, 3.9.18, and 3.8.18 and prior.

The zipfile module is vulnerable to “quoted-overlap” zip-bombs which exploit the zip format to create a zip-bomb with a high compression ratio. The fixed versions of CPython makes the zipfile module reject zip archives which overlap entries in the archive.

Weakness: CWE-405 (Asymmetric Resource Consumption (Amplification))

## Which versions are affected by CVE-2024-0450?

3 open source packages ship an affected version, including libpython, python and python-min.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | All versions | 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.2 |
| `python` | Bitnami | All versions | 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.2 |
| `python-min` | Bitnami | All versions | 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.2 |
| `python3.12` | AlmaLinux:8 | All versions | 3.12.3-2.el8_10 |
| `python3.12-debug` | AlmaLinux:8 | All versions | 3.12.3-2.el8_10 |
| `python3.12-devel` | AlmaLinux:8 | All versions | 3.12.3-2.el8_10 |
| `python3.12-idle` | AlmaLinux:8 | All versions | 3.12.3-2.el8_10 |
| `python3.12-libs` | AlmaLinux:8 | All versions | 3.12.3-2.el8_10 |
| `python3.12-rpm-macros` | AlmaLinux:8 | All versions | 3.12.3-2.el8_10 |
| `python3.12-test` | AlmaLinux:8 | All versions | 3.12.3-2.el8_10 |
| `python3.12-tkinter` | AlmaLinux:8 | All versions | 3.12.3-2.el8_10 |
| `python3.12` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-devel` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-libs` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-rpm-macros` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-tkinter` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.12.3-2.el8_10 |
| `python3.12` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-debug` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-debuginfo` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-debugsource` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-idle` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-test` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.12.3-2.el8_10 |
| `python3.12-tkinter` | Red Hat:enterprise_linux:8::crb | All versions | 0:3.12.3-2.el8_10 |
| `python3.12` | Rocky Linux:8 | All versions | 0:3.12.3-2.el8_10 |
| `python3` | SUSE:Linux Enterprise Module for Web and Scripting 12 | All versions | 3.4.10-25.130.1 |
| `python3-base` | SUSE:Linux Enterprise Module for Web and Scripting 12 | All versions | 3.4.10-25.130.1 |
| `python` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.7.18-33.35.1 |
| `python-base` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.7.18-33.35.1 |
| `python-doc` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.7.18-33.35.1 |
| `python3` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 3.4.10-25.130.1 |
| `python3-base` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 3.4.10-25.130.1 |
| `python` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.7.18-33.35.1 |
| `python-base` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.7.18-33.35.1 |
| `python-doc` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.7.18-33.35.1 |
| `python3` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 3.4.10-25.130.1 |
| `python3-base` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 3.4.10-25.130.1 |
| `python3` | SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 3.4.10-25.130.1 |
| `python3-base` | SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 3.4.10-25.130.1 |

## How do I fix CVE-2024-0450?

Upgrade libpython to a fixed version for your release line: 3.8.19, 3.9.19, 3.10.14 or 3.11.8.

## Is CVE-2024-0450 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-0450 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-0450 and fix it if it is affected.

What it is: CVE-2024-0450 is a medium-severity denial of service vulnerability in CPython, published on 19 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-0450 exists.

Affected packages and fixed versions:
- libpython (Bitnami): affected all versions; fixed in 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.2
- python (Bitnami): affected all versions; fixed in 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.2
- python-min (Bitnami): affected all versions; fixed in 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-0450/ (Markdown: https://insights.sbomify.com/CVE-2024-0450/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-0450
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-0450
- OSV: https://osv.dev/vulnerability/CVE-2024-0450

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-0450/
Summaries are generated and may contain mistakes; the official description above is the record.
