Skip to content

chore(deps): update dependency adm-zip to v0.6.0 [security] - #673

Open
renovate[bot] wants to merge 1 commit into
developfrom
renovate/npm-adm-zip-vulnerability
Open

chore(deps): update dependency adm-zip to v0.6.0 [security]#673
renovate[bot] wants to merge 1 commit into
developfrom
renovate/npm-adm-zip-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
adm-zip 0.4.110.6.0 age confidence

adm-zip: Crafted ZIP file triggers 4GB memory allocation

CVE-2026-39244 / GHSA-xcpc-8h2w-3j85

More information

Details

adm-zip before 0.5.18 is vulnerable to denial of service via a crafted ZIP file with a manipulated uncompressed size header field. In zipEntry.js line 103, Buffer.alloc(_centralHeader.size) allocates memory based on the declared uncompressed size from the ZIP central directory header without validating it against the actual compressed data size or imposing any upper bound. The size value is read directly from the binary header at entryHeader.js line 266 with no bounds check. An attacker can craft a ~120-byte ZIP file that declares ~4GB uncompressed size, causing a memory allocation amplification ratio of over 33 million to 1. The allocation occurs before CRC validation, so the malicious payload cannot be rejected early. All extraction and read methods are affected: readFile(), readAsText(), extractEntryTo(), extractAllTo(), extractAllToAsync(), test(), and entry.getData(). Any application accepting untrusted ZIP files via adm-zip is vulnerable to immediate process crash.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

cthackers/adm-zip (adm-zip)

v0.6.0

Compare Source

==================

Security

  • Fixed CVE-2026-39244: a crafted archive declaring a huge uncompressed size could force an unbounded Buffer.alloc (memory exhaustion / DoS) before any validation. Allocation is now bounded by the data actually present — STORED output is sized from the real bytes, DEFLATED output is grown by the inflater and capped at the declared size (#​568)
  • Hardened the internal entry-name lookup table against object injection: entry names come from untrusted archives, and a name such as __proto__ previously resolved to Object.prototype, crashing addFile and hiding the entry from getEntry/readFile. The table is now prototype-less

Bug fixes

  • Fixed a regression (0.5.15) that rejected valid archives using a data descriptor (general-purpose bit 3). The payload is now validated against the authoritative central-directory CRC instead of requiring/parsing the trailing descriptor (#​548, #​533, #​554)
  • Fixed extractAllTo/extractAllToAsync not restoring directory permissions with keepOriginalPermission; directory modes are applied after their contents are written, deepest path first, and no longer lock the extractor out of a restrictive directory (#​530)
  • Fixed infinite recursion in addLocalFolder when a folder contains a symlink pointing back to an ancestor (e.g. workspace node_modules); the walk now tracks resolved real paths and skips already-visited directories (#​541)
  • Fixed an uncaught exception (ERR_INVALID_ARG_TYPE) that crashed the process when writeFileToAsync could not open the target file (bad permissions, invalid filename, exhausted file descriptors); write failures are now reported through the callback and write errors are no longer silently swallowed (#​470, #​459, #​402)
  • Fixed directory entries reporting an empty name (e.g. a/b/c/ now returns c) (#​466)
  • Fixed extractEntryTo flattening subdirectories when maintainEntryPath is false; the structure below the extracted directory is now preserved instead of collapsing (and overwriting) files by basename (#​306)
  • Fixed a failed utimes aborting extraction; setting the modification time is now best-effort and never fails extraction of already-written content (#​379)
  • Fixed test() always returning false for any archive containing a file (it indexed the entries array with an entry object instead of reading the entry); it now correctly verifies each entry's CRC

Performance

  • Faster entry sorting when writing archives with many entries: names are decoded once instead of on every comparison (about 6× faster sort for large archives)

Added

  • Bundled TypeScript type definitions (types.d.ts), so @types/adm-zip is no longer required

Notes

  • Behavior change: extractEntryTo(dir, target, /* maintainEntryPath */ false) now preserves subdirectories beneath the extracted directory rather than flattening them
  • Behavior change: extraction no longer fails when the modification time cannot be set

v0.5.18

Compare Source

What's Changed
New Contributors

Full Changelog: cthackers/adm-zip@v0.5.17...v0.5.18

v0.5.17

Compare Source

What's Changed

New Contributors

Full Changelog: cthackers/adm-zip@v0.5.16...v0.5.17

v0.5.16

Compare Source

What's Changed

New Contributors

Full Changelog: cthackers/adm-zip@v0.5.15...v0.5.16

v0.5.15

Compare Source

What's Changed

New Contributors

Full Changelog: cthackers/adm-zip@v0.5.14...v0.5.15

v0.5.14

Compare Source

Fixed an issue introduced on version 0.5.13 requiring a new mandatory parameter on the inflater on nodejs version >= 15

v0.5.13

Compare Source

  • Fixed extractAllToAsync callback @​5saviahv
  • Fixed issue with "toAsyncBuffer" where after that command all entries are gone @​5saviahv
  • Minor fixes (tests, typos etc) @​5saviahv
  • Added a an option to specificy the maximum expectedLength of the file to protect against zip bombs or limit memory usage @​undefined-moe
  • Add check for invalid large disk entries @​criyle

v0.5.12

Compare Source

Fixed extraction error

v0.5.11

Compare Source

  • Add support for Info-Zip password check spec for ZipCrypto @​lukemalcolm
  • Extraction of password protected zip entries @​Santa77
  • Fixed unnecessary scanning a local file headers (except in the case of corrupted archives) @​likev
  • Added GitHub actions @​kibertoad
  • Fixed cases when extra data was lost @​yfdyh000
  • Fixed throw empty error in extractAllToAsync on operation done @​Autokaka

v0.5.10

Compare Source

v0.5.9

Compare Source

v0.5.8

Compare Source

v0.5.7

Compare Source

v0.5.6: .

Compare Source

v0.5.5

Compare Source

v0.5.4

Compare Source

==================

  • Fixed relative paths
  • Added zipcrypto encryption
  • Lower verMade for macOS when generating zip file

v0.5.3

Compare Source

==================

  • Fixed filemode when unzipping

v0.5.2

Compare Source

==================

  • Fixed path traversal issue (GHSL-2020-198)

v0.5.1

Compare Source

==================

  • Incremented version (cthackers)
  • Fixed outFileName (cthackers)

v0.5.0

Compare Source

==================

  • Added extra parameter to extractEntryTo so target filename can be renamed (cthackers)
  • Updated dev dependency (cthackers)
  • modified addLocalFolder method (5saviahv)
  • modified addLocalFile method (5saviahv)
  • Deflate needs min V2.0 (5saviahv)
  • Node v6 (5saviahv)
  • Added ZipCrypto decrypting ability (5saviahv)
  • LICENSE filename in package.json (5saviahv)
  • add multibyte-encoded comment with byte length instead of character length (Kosuke Suzuki)
  • Bump lodash from 4.17.15 to 4.17.19 (dependabot[bot])
  • now it works in browser (Emiliano Necciari)

v0.4.16

Compare Source

===================

  • Updated mocha version to fix vulnerability (cthackers)
  • Update project version (cthackers)
  • fix: throw real exception objects on error (Matthew Sainsbury)
  • Version number incremented (Saqib M)
  • Update zipFile.js (Saqib M)
  • Update README.md with the latest URLs (Takuya Noguchi)
  • Update Node.js version to use in CI tests (Takuya Noguchi)
  • process.versions is null when the library is used in browser (Emiliano Necciari)

v0.4.14

Compare Source

===================

  • Version increment for npm publish (cthackers)
  • Iterate over entries without storing their metadata (Pierre Lehnen)
  • Add partial support for zip64 (larger number of entries) (Pierre Lehnen)
  • Escape $ sign for regex in addLocalFolder() (William)
  • fix accent filename (mart_-)
  • Removed improperly raised error while decompressing empty file asynchronously. (Nicolas Leclerc)
  • fix: CRC is unexpectedly changed after zip is re-created (teppeis)

v0.4.13

Compare Source

===================

  • Add async version of addLocalFile Use open and readFile instead of existsSync and readFileSync. There are still some sync functions left in the Utils.findFiles call, but the impact is minimal compared to the readFileSync. (Maigret Aurelien)
  • Fix jsdoc typings for functions. (Leon Aves)
  • fixed Utils.FileSystem overwriting 'fs' module even when 'original-fs' is broken (Tom Wallroth)
  • fix race-condition crash when extracting data and extracted files are (re)moved (Tom Wallroth)
  • Fix: bad buffer.alloc for .toBuffer in async mode (Colin GILLE)
  • Add a full license text to the distribution (Honza Javorek)
  • Rename MIT-LICENSE.txt to LICENSE (Standa Opichal)
  • fix bug when filename or path contains multi-byte characters (warbaby)
  • bump version to 0.4.12 (Marsette Vona)
  • change default compression method for added files back to DEFLATED from STORED (revert #​139) (Marsette Vona)
  • remove JSDeflater() and JSInflater() in favor of zlib.deflateRawSync() and zlib.inflateRawSync() respectively (Marsette Vona)
  • Fix (Mirko Tebaldi)
  • 0.4.12 - Created a test to check Twizzeld's issue on Issue #​237. (was not able to replicate his issue) (cjacobs)
  • Fix Buffer.alloc bug #​234 (keyesdav)
  • 0.4.12 - Fix additional issue with extractEntryTo improperly handling directory children. (cjacobs)
  • 0.4.12 - Fix #​237, add tests, update travis node versions. (cjacobs)
  • 0.4.12 - Fix #​237, add tests, update travis node versions. (cjacobs)
  • 0.4.12 - Fix #​237, add tests, update travis node versions. (cjacobs)
  • 0.4.12 - Fix #​237, add tests, update travis node versions. (cjacobs)
  • add tests for CRC fixes (Kevin Tjiam)
  • compare calculated CRC with loaded CRC (Kevin Tjiam)
  • handle errors in callback from getDataAsync (Kevin Tjiam)

Configuration

📅 Schedule: (in timezone America/New_York)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from a team as a code owner August 10, 2026 22:40
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Test Results

   10 files  ±0  1 167 suites  ±0   14m 32s ⏱️ +39s
3 064 tests ±0  3 056 ✅ ±0   8 💤 ±0  0 ❌ ±0 
6 738 runs  ±0  6 699 ✅ ±0  39 💤 ±0  0 ❌ ±0 

Results for commit 04ed274. ± Comparison against base commit c60cb90.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants