Skip to content

Fix high-severity adm-zip DoS (CVE-2026-39244) — bump to 0.6.0 (REV-54) - #44

Merged
ashirman merged 7 commits into
mainfrom
feature/rev-54
Jul 18, 2026
Merged

Fix high-severity adm-zip DoS (CVE-2026-39244) — bump to 0.6.0 (REV-54)#44
ashirman merged 7 commits into
mainfrom
feature/rev-54

Conversation

@revopushbot

Copy link
Copy Markdown
Contributor

Summary

Fixes the high-severity Dependabot alert on adm-zip by bumping ^0.5.16^0.6.0.

adm-zip < 0.6.0 calls Buffer.alloc(declared_uncompressed_size) using the size read straight from the ZIP central-directory header — no bounds check, and before CRC validation. A crafted ~120-byte ZIP declaring ~4 GB uncompressed causes a ~33-million-to-1 allocation amplification → memory exhaustion / process crash (CVE-2026-39244). 0.6.0 bounds allocation to the actual data present.

Exposure in this repo

adm-zip is used in exactly two spots — extractAPK and extractAAB in script/utils/file-utils.ts — both new AdmZip(zipPath) + zip.extractAllTo(extractTo, true) on user-supplied APK/AAB binaries during release / release-react. A malicious/corrupt artifact can crash the CLI, so this is worth fixing beyond silencing Dependabot.

Backward compatibility: LOW RISK

0.6.0 change Impact here
extractEntryTo now preserves subdirs (only breaking API change) None — repo only calls extractAllTo
Mod-time setting now best-effort Strictly more robust
Node engine >=14 Repo requires >=20.19.0
Now bundles types.d.ts Harmless — noImplicitAny:false, skipLibCheck:true, no @types/adm-zip installed

Verification

  • tsc build compiles clean
  • npm audit no longer flags adm-zip
  • ✅ Smoke test: extracted a real ~50 MB app-release.apk — 966 entries → 922 files, subdirs preserved, AndroidManifest.xml / resources.arsc / classes.dex intact, ~435 ms

Linear: REV-54

🤖 Generated with Claude Code

revopushbot and others added 7 commits July 18, 2026 14:33
adm-zip < 0.6.0 allocates Buffer.alloc(declared_uncompressed_size) before
CRC validation with no bounds check, so a ~120-byte crafted ZIP declaring
~4GB uncompressed can exhaust memory and crash the process. 0.6.0 bounds
allocation to the actual data present.

Used only by extractAPK/extractAAB in script/utils/file-utils.ts via
extractAllTo, which is unaffected by 0.6.0's extractEntryTo behavior change.
Verified: tsc build clean, npm audit clears adm-zip, and a real ~50MB
app-release.apk extracts identically (966 entries -> 922 files).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The "check" job (npm ci + build) runs on every PR targeting main and is
named to satisfy the org-wide required-status-check branch protection rule.
Lint runs as a separate informational job (continue-on-error) because the
repo currently has pre-existing eslint errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The base eslint no-unused-vars rule is not TS-aware and falsely flagged every
CommandType enum member and the ReleaseHook function-type parameter names.
Switch to @typescript-eslint/no-unused-vars (plugin already installed), which
correctly treats enum members and type-position parameters as used, and add
^_ ignore patterns for intentionally-unused vars/args.

Also fix the one genuine issue it left: != -> !== in debug.ts (eqeqeq), and
drop continue-on-error from the lint CI job now that lint is clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The base eslint no-unused-vars rule is not TS-aware and falsely flagged every
CommandType enum member and the ReleaseHook function-type parameter names.
Switch to @typescript-eslint/no-unused-vars (plugin already installed), which
correctly treats enum members and type-position parameters as used, and add
^_ ignore patterns for intentionally-unused vars/args.

Also fix the one genuine issue it left: != -> !== in debug.ts (eqeqeq), and
drop continue-on-error from the lint CI job now that lint is clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Pin actions to full commit SHAs (v7.0.0) instead of mutable tags, with
  version comments for readability/Dependabot
- Add least-privilege top-level permissions (contents: read)
- Add concurrency group with cancel-in-progress to drop superseded PR runs
- Add timeout-minutes guard and persist-credentials: false on checkout

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Weekly version updates for the SHA-pinned actions in .github/workflows,
grouped into a single PR. Dependabot bumps the commit SHA and the
accompanying version comment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ashirman
ashirman merged commit 42224c1 into main Jul 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants