ajtazer/heckit / skills/cve-hunting/decompression-bomb
decompression-bomb
VerifiedDetect decompression bomb vulnerabilities where compressed input can expand to exhaust memory, targeting buffer-based decompression without size limits.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.8 KB |
| references/false-positive-indicators.md | markdown | 959 B |
| references/poc-skeleton.md | markdown | 2.5 KB |
| references/sinks.md | markdown | 1.7 KB |
references/sinks.md
View on GitHub# Decompression Sinks by Language
## JavaScript / TypeScript
| Sink | Type | Risk |
|------|------|------|
| `zlib.gunzipSync(buf)` | Buffer | HIGH -- full output in memory |
| `zlib.inflateSync(buf)` | Buffer | HIGH |
| `zlib.brotliDecompressSync(buf)` | Buffer | HIGH |
| `zlib.gunzip(buf, callback)` | Buffer (async) | HIGH -- full output in callback |
| `zlib.createGunzip()` | Stream | MEDIUM -- check backpressure |
| `zlib.createInflate()` | Stream | MEDIUM |
| `pako.inflate(buf)` | Buffer | HIGH |
| `pako.ungzip(buf)` | Buffer | HIGH |
| `fflate.decompressSync(buf)` | Buffer | HIGH |
| `fflate.gunzipSync(buf)` | Buffer | HIGH |
| `lz-string.decompress(str)` | Buffer | HIGH |
| `snappy.uncompressSync(buf)` | Buffer | HIGH |
## Python
| Sink | Type | Risk |
|------|------|------|
| `zlib.decompress(data)` | Buffer | HIGH |
| `gzip.decompress(data)` | Buffer | HIGH |
| `bz2.decompress(data)` | Buffer | HIGH |
| `lzma.decompress(data)` | Buffer | HIGH |
| `gzip.open().read()` | Stream->Buffer | HIGH if read() called |
| `zipfile.read()` | Buffer | HIGH |
| `tarfile.extractfile().read()` | Stream->Buffer | HIGH |
### Python zlib with maxLength
```python
# SAFER -- limits output size
zlib.decompress(data, wbits=15, bufsize=MAX_SIZE)
# But bufsize is just initial allocation, not a hard limit!
# Use zlib.decompressobj() with incremental decompression for true limiting
```
## Go
| Sink | Type | Risk |
|------|------|------|
| `gzip.NewReader(r)` + `io.ReadAll()` | Stream->Buffer | HIGH |
| `zlib.NewReader(r)` + `io.ReadAll()` | Stream->Buffer | HIGH |
| `io.Copy(dst, gzipReader)` | Stream | MEDIUM -- depends on dst |
| `io.LimitReader(r, maxBytes)` | Stream | SAFE -- hard limit |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |