Repository navigation
fix(deps): resolve adm-zip to 0.6.1 - #1302
Merged
Merged
Conversation
package.json already declares `adm-zip: ^0.6.0`, so the range permits 0.6.1; only the lockfile was holding the tree on 0.6.0. That version carries seven published advisories, all of which 0.6.1 addresses: GHSA-vwc7-r8mq-g2x9 extraction follows destination symlinks → arbitrary overwrite GHSA-7q85-xj36-vmfc uncontrolled memory allocation via declared uncompressed size GHSA-rcw4-f5rp-g42v bomb protection bypassed by declaring uncompressed size as 0 GHSA-j5f4-cc29-5x44 extraction preserves SUID/SGID bits GHSA-p634-w6r4-rjp2 duplicate entry names resolve differently in getEntry/extractAllTo GHSA-c6fg-446q-cg94 getDataAsync bypasses the maxOutputLength guard GHSA-8238-w5pm-2374 unhandled error event in async DEFLATE crashes the process Lockfile only; no source file and no declared range changes. `npm audit` on the installed tree before: 29 total, 15 high, adm-zip listed. After: 28 total, 14 high, adm-zip absent. Verified for behaviour, not just version: `extractPluginArchive` was called directly with both versions and the results are identical — a normal package is accepted with the same entry count and byte count, `getEntry`/`header.size`/`getData` behave the same, and traversal and absolute-path entries resolve to the same in-destination paths because adm-zip normalises them at write time. No difference was observed in any case.
Contributor
|
@jorgepb96 @prismatic7, all required checks have passed for the latest revision of this PR. It is ready for maintainer review and merge consideration. Latest revision: |
This was referenced Oct 24, 2026
Closed
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
package.jsondeclares"adm-zip": "^0.6.0", so the range already permits0.6.1. Onlypackage-lock.jsonwas holding the tree on0.6.0, which carries seven published advisories.This changes one line in the lockfile and nothing else.
0getEntry()andextractAllTo()getDataAsync()bypasses themaxOutputLengthguard"node_modules/adm-zip": { - "version": "0.6.0", + "version": "0.6.1",I did not run a bare
npm update adm-zip: it rewrites ~300 lines of unrelated optional peer entries(
@lezer/common,encoding, …) in this lockfile and would bury the change. The edit is surgicaland
npm ciaccepts it.Related issue
Closes #1301
Type of change
Validation
npm ci --dry-run --include=dev— exit 0 with the edited lockfile, so the lock andpackage.jsonagree.npm auditbefore: 29 total (1 critical, 15 high, 9 moderate, 4 low),adm-ziplisted.After: 28 total (1 critical, 14 high, 9 moderate, 4 low),
adm-zipabsent.extractPluginArchivefromelectron/capabilities/packageArchive.tswas called directly against 0.6.0 and 0.6.1 with thesame four archives. Output was identical in every case: a normal package accepted with the same
entry count and byte count,
getEntry()/header.size/getData()unchanged, and traversaland absolute-path entries resolving to the same in-destination paths.
test-capability-plugin-store,test-capability-updates,test-library-attachment-html-sanitize,test-library-extraction-progress-cancel— 33/33 pass.Two suites in that area (
test-research-attachments,test-primary-sources-archive) fail to startin this environment at
requireElectronRuntime(scripts/lib/tsRuntimeHooks.mjs:121), before anyzip code runs. I installed 0.6.0 back and re-ran them: they fail identically, so the failure is
pre-existing and environmental rather than caused by this change.
Lint, typecheck and build are unaffected — no source file is touched. CI's
qualityjob coversthem regardless.
Screenshots
Not applicable: a lockfile version change with no interface effect.
Privacy and data review
Contributor checklist
unit test would give.
CONTRIBUTING.mdandCODE_OF_CONDUCT.md.Two observations, unrelated to this bump
Both are identical on 0.6.0 and 0.6.1, so neither is a reason to hold this change. Recording
them because I found them while verifying, and they may be intentional:
extractPluginArchiverefuses any archive that contains an explicit directory entry —assets/ [dir]fails with "Unsafe plugin archive entry: assets/", becausesafeEntryPathtreats thetrailing slash as an empty segment. Many zip writers emit directory entries by default.
../../escaped.txtentry is stored by adm-zip asescaped.txt, so it lands inside thedestination and
safeEntryPathis never consulted. The outcome is safe; it just comes fromadm-zip's normalisation rather than from the guard.