[Aikido] Fix 18 security issues in tar, adm-zip - #71
Open
aikido-autofix[bot] wants to merge 1 commit into
Open
Conversation
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.
Description
Upgrade tar and adm-zip to fix path traversal, infinite loops, and gzip bomb DoS vulnerabilities in archive extraction.
Motivation
✅ 18 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
.split('/')on the numeric value, crashing the Node.js process during archive extraction.Type of change (choose one)
Breaking Changes & Upgrade Impact
✅ No breaking changes from the adm-zip upgrade affect this codebase.
The codebase only uses
extractAllTo()method (innpm/postinstall.ts:217), not theextractEntryTo()method that had breaking changes in behavior. The Node.js version requirement change (from >=12 to >=14) is also not an issue since the package.json specifies Volta node version 24.13.0, which is well above the new minimum. The CVE fix regarding allocation bounds should not cause issues as it only affects archives with maliciously large declared uncompressed sizes.All breaking changes by upgrading adm-zip from version 0.5.10 to 0.6.0 (CHANGELOG)
Fix Details / Technical Implementation
🤖 Remediation details
Fix security vulnerabilities in
tarandadm-zipdirect dependenciesShort summary
This PR remediates multiple HIGH and MEDIUM severity vulnerabilities in two direct dependencies —
tarandadm-zip— declared innpm/package.json. Both packages were updated by editing their version specs in the manifest and refreshingnpm/package-lock.jsonvianpm install --package-lock-only.tar
taris a direct dependency innpm/package.json, previously pinned to^7.5.3and resolving to7.5.6. That resolved version fell within the vulnerable ranges of 16 separate advisories (HIGH and MEDIUM severity). The declared spec was bumped to^7.5.21— the highest patched floor required across all advisories — andnpm install --package-lock-onlyresolved it to7.5.22, clearing all affected ranges.adm-zip
adm-zipis a direct dependency innpm/package.json, previously declared as^0.5.10and resolving to0.5.10. That version falls within the vulnerable range (>=0.5.10 <0.5.18) for two advisories requiring a patched version of0.6.0. Because0.6.0is a semver-major bump relative to the0.5.xrange, the declared spec was updated to^0.6.0;npm install --package-lock-onlyresolved it to0.6.0, satisfying both advisories.Version changes
tar^7.5.3→7.5.6resolved^7.5.21→7.5.22resolvedadm-zip^0.5.10→0.5.10resolved^0.6.0→0.6.0resolvedChecklist
Check our Pull Request Guidelines
Note
Medium Risk
Security-sensitive archive extraction libraries used by the CLI installer; adm-zip is a major version with extraction path behavior changes that could affect postinstall unpacking.
Overview
Bumps CLI npm dependencies used for archive extraction to patched versions:
tar^7.5.3→^7.5.21(lockfile7.5.22) andadm-zip^0.5.10→^0.6.0.This addresses path traversal, hardlink/symlink escapes, gzip/decompression bombs, and related DoS issues in extraction.
Note:
adm-zip0.6.0 is a major bump.extractEntryTonow keeps subdirectory structure instead of flattening by basename, and Node ≥14 is required. Archives with inflated uncompressed sizes may now be rejected.Reviewed by Cursor Bugbot for commit e4eb034. Bugbot is set up for automated code reviews on this repo. Configure here.