High Compression Ratio Zip-Bomb Vulnerability in CPython zipfile Module

python3 Updated 02 Oct 2025

Summary

19/03/2024
N/A
Yes i
Unrated
Not published

CVE-2024-0450: 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. Affects python3 across 8 version ranges.

< 3.10.14-r0 < 30fe5d853b56138dbec62432d370a1f99409fc85 < 66363b9a7b9fe7c99eba3a185b74c5fdbf842eba < 70497218351ba44bffc8b571201ecb5652d84675 < a2c59992e9e8d35baba9695eb186ad6c6ff85c51 < a956e510f6336d5ae111ba429a61c3ade30a7549 < d05bac0b74153beb541b88b4fca33bf053990183 < fa181fcf2156f703347b03a3b1966ce47be8ab3b

Fixed in 3.10.14-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The CPython zipfile module is a built-in module in the Python programming language that provides tools for creating, reading, and extracting ZIP archives. It is widely used for tasks such as file compression and packaging. However, versions 3.12.2, 3.11.8, 3.10.13, 3.9.18, and 3.8.18 and prior are vulnerable to a high compression ratio zip-bomb attack known as 'quoted-overlap'. This vulnerability allows an attacker to create a malicious ZIP archive that can consume excessive system resources when extracted, potentially leading to denial-of-service (DoS) conditions.

Vulnerability Detail

The 'quoted-overlap' zip-bomb vulnerability in the CPython zipfile module arises from a flaw in the handling of overlapping entries in ZIP archives. By exploiting this vulnerability, an attacker can create a ZIP archive that appears to have a small size but expands to an enormous size when extracted. This can overwhelm the system's resources, causing performance degradation or even crashing the system. The fixed versions of CPython address this issue by rejecting zip archives that contain overlapping entries.

How To Fix

Minimum fixed version

3.10.14-r0

This is the first release that contains the fix.

sudo apk add --upgrade python3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update to the fixed versions of CPython to ensure the security and stability of the system.

Conclusion

The 'quoted-overlap' zip-bomb vulnerability in the CPython zipfile module can be mitigated by updating to the fixed versions of CPython. It is crucial to keep software up to date to ensure the security and stability of systems. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for python3 →

Share this vulnerability

FAQ

This vulnerability can be exploited to create zip-bombs that consume excessive system resources when extracted, potentially leading to denial-of-service conditions.

Yes, versions 3.12.2, 3.11.8, 3.10.13, 3.9.18, and 3.8.18 and prior are vulnerable to this zip-bomb attack.

No, this vulnerability requires the attacker to provide a malicious ZIP archive for extraction on the target system.

At the time of this report, there is no known public exploit for this vulnerability.

It is strongly advised to update to the fixed versions of CPython to mitigate the risk of this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for python3.

How To Fix

Minimum fixed version

3.10.14-r0

This is the first release that contains the fix.

sudo apk add --upgrade python3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback