You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This release fixes a security vulnerability (CVE-2026-39244), resolves several long-standing bugs, ships built-in TypeScript types, and includes two behavior changes worth reading before you upgrade.
extractEntryTo(dirEntry, target, maintainEntryPath = false) now preserves subdirectories instead of flattening files into the target folder by basename (which also silently overwrote same-named files). (#306)
Extraction no longer fails when the modification time can't be set — utimes is now best-effort. (#379)
Minimum Node.js is now 14 (the code already required it; engines was incorrectly >=12).
CVE-2026-39244 — a crafted archive declaring a huge uncompressed size could force an unbounded Buffer.alloc and OOM the process; allocation is now bounded by the data actually present. Reported by Daniel Púa (devploit), Anh Hong, and José Antonio Zamudio Amaya. (#568)
Hardened entry-name lookup against object injection (proto names). Prototype-less table.
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
0.5.4 / 2021-03-08
Fixed relative paths
Added zipcrypto encryption
Lower verMade for macOS when generating zip file
0.5.3 / 2021-02-07
Fixed filemode when unzipping
0.5.2 / 2021-01-27
Fixed path traversal issue (GHSL-2020-198)
0.5.1 / 2020-11-27
Incremented version (cthackers)
Fixed outFileName (cthackers)
0.5.0 / 2020-11-19
Added extra parameter to extractEntryTo so target filename can be renamed (cthackers)
... (truncated)
Commits
2b4d840 updated minimum node engine version to >= 14
dc57f0f Hardened entry-name lookup, fixed test(), and sped up entry sorting
f81806a Made utimes best-effort so it can't abort extraction (#379)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependenciesPull requests that update a dependency filejavascriptPull requests that update javascript code
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps adm-zip from 0.5.18 to 0.6.0.
Release notes
Sourced from adm-zip's releases.
Changelog
Sourced from adm-zip's changelog.
... (truncated)
Commits
2b4d840updated minimum node engine version to >= 14dc57f0fHardened entry-name lookup, fixed test(), and sped up entry sortingf81806aMade utimes best-effort so it can't abort extraction (#379)ab04324Fixed extractEntryTo flattening subdirectories (#306)8a5d9baFixed empty name for directory entries (#466)3e72790Fixed uncaught crash in writeFileToAsync on write failure (#470, #459, #402)651ae4cAdded typescript typese72021dFixed infinite recursion on symlink loops in addLocalFolder (#541)8f3176bFixed directory permissions on linux4d2c8f9Fixed error introduced with zip descriptor checks