Skip to content

[Aikido] Fix 18 security issues in tar, adm-zip - #71

Open
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-94960683-hx6p
Open

[Aikido] Fix 18 security issues in tar, adm-zip#71
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/aikido-security-update-packages-94960683-hx6p

Conversation

@aikido-autofix

@aikido-autofix aikido-autofix Bot commented Aug 23, 2026

Copy link
Copy Markdown

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:

Issue Severity           Description
CVE-2026-24842
HIGH
[tar] A path traversal vulnerability exists where hardlink security checks use different path resolution semantics than the actual creation logic, allowing attackers to bypass protections and create hardlinks to arbitrary files outside the extraction directory.
AIKIDO-2026-732519
HIGH
[tar] A crafted tar archive with a negative base-256 encoded size can cause the library to loop infinitely on the same header during archive scanning, resulting in a denial of service that pins the worker process.
AIKIDO-2026-986821
HIGH
[tar] A decompression bomb vulnerability allows attackers to exhaust disk storage by crafting TAR archives with highly compressible data claiming massive file sizes, causing denial of service through uncontrolled resource consumption during extraction.
CVE-2026-59873
HIGH
[tar] A gzip bomb vulnerability allows attackers to craft small malicious tar archives that exhaust disk space and CPU resources during extraction due to missing decompression limits. This enables denial of service attacks through uncontrolled decompression of highly compressed data.
CVE-2026-59874
HIGH
[tar] A vulnerability allows attackers to craft malicious tar archives with negative base-256 encoded entry sizes that cause the archive scanner to enter an infinite loop, resulting in a denial of service. The flaw exploits improper validation of checksum-valid tar headers with crafted size values.
CVE-2026-59871
HIGH
[tar] A vulnerability in PAX path handling coerces all-digit values to numbers, causing uncaught TypeErrors in downstream path processing. This leads to denial of service through application crashes when processing malicious tar archives.
CVE-2026-73566
HIGH
[tar] A crafted tar archive with extremely long paths in GNU L or PAX headers causes a stack overflow in the filesFilter function when member-selection is used, leading to a denial of service that terminates Node.js processes. The vulnerability occurs before path depth validation is applied, allowing attackers to crash applications processing untrusted tar files.
CVE-2026-26960
HIGH
[tar] An attacker-controlled tar archive can create hardlinks pointing outside the extraction directory, enabling arbitrary file read/write access as the extracting user. This bypasses path protections and allows direct filesystem access during archive extraction.
CVE-2026-29786
MEDIUM
[tar] A vulnerability allows attackers to create hardlinks pointing outside the extraction directory using drive-relative paths, enabling arbitrary file overwrite during extraction. This could lead to remote code execution or data tampering depending on the target files.
AIKIDO-2026-11058
MEDIUM
[tar] A parser differential vulnerability allows attackers to craft tar archives where PAX extended headers override sizes of metadata entries, causing tar to read different members than other tools and enabling malicious files to be hidden from security scanners while still being extracted downstream.
CVE-2026-31802
MEDIUM
[tar] A vulnerability allows attackers to create symlinks pointing outside the extraction directory using drive-relative paths, enabling arbitrary file overwrite during extraction. This could lead to remote code execution or data tampering depending on the target files.
CVE-2026-53655
MEDIUM
[tar] A PAX extended header size override vulnerability allows attackers to desynchronize node-tar's stream parsing relative to other tar implementations, causing different archive members to be visible in node-tar versus standard tools. This parser differential can hide malicious files from security scanners while remaining extractable by the vulnerable parser.
AIKIDO-2026-568044
MEDIUM
[tar] A parsing vulnerability allows crafted PAX extended headers with embedded NUL bytes in paths to bypass validation and cause uncaught exceptions during archive extraction, enabling denial of service and validator bypass attacks.
CVE-2026-59875
MEDIUM
[tar] A crafted tar archive with NUL bytes in PAX path and linkpath records can cause an uncaught exception in fs.lstat or fs.open, leading to denial of service by terminating the process.
AIKIDO-2026-401672
MEDIUM
[tar] A PAX header parser vulnerability coerces path values to numbers, causing an uncaught TypeError when downstream code calls .split('/') on the numeric value, crashing the Node.js process during archive extraction.
AIKIDO-2026-48452
MEDIUM
[tar] A recursive function in the filesFilter helper lacks depth limits, allowing a crafted archive with extremely long paths to cause stack overflow and crash the process. This results in a denial of service for applications that stream or asynchronously extract archives.
AIKIDO-2026-123346
HIGH
[adm-zip] A path traversal vulnerability in ZIP extraction allows attackers to allocate arbitrarily large buffers by crafting archives with inflated declared uncompressed sizes, causing denial of service through memory exhaustion and process crashes.
CVE-2026-39244
LOW
[adm-zip] A crafted ZIP file with manipulated uncompressed size headers causes excessive memory allocation without validation, leading to denial of service and process crashes. An attacker can create a ~120-byte file declaring ~4GB uncompressed size, achieving a 33 million to 1 amplification ratio.

Type of change (choose one)

  • Chore (refactors, upgrades, etc.)
  • Bug fix (non-breaking change that fixes an issue)
  • Security fix (non-breaking change that fixes a potential vulnerability)
  • Docs
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

Breaking Changes & Upgrade Impact

⚠️ Incomplete breaking changes analysis (1/2 analyzed)

⚠️ Breaking changes analysis not available for: tar

✅ No breaking changes from the adm-zip upgrade affect this codebase.

The codebase only uses extractAllTo() method (in npm/postinstall.ts:217), not the extractEntryTo() 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)

Version Description
0.6.0
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)
0.6.0
Minimum Node.js is now 14 (previously allowed >=12)
0.6.0
CVE-2026-39244 fix — allocation is now bounded by the data actually present, which may reject archives declaring huge uncompressed sizes that previously would have been processed (before OOM)

Fix Details / Technical Implementation

🤖 Remediation details

Fix security vulnerabilities in tar and adm-zip direct dependencies

Short summary

This PR remediates multiple HIGH and MEDIUM severity vulnerabilities in two direct dependencies — tar and adm-zip — declared in npm/package.json. Both packages were updated by editing their version specs in the manifest and refreshing npm/package-lock.json via npm install --package-lock-only.

tar

tar is a direct dependency in npm/package.json, previously pinned to ^7.5.3 and resolving to 7.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 — and npm install --package-lock-only resolved it to 7.5.22, clearing all affected ranges.

adm-zip

adm-zip is a direct dependency in npm/package.json, previously declared as ^0.5.10 and resolving to 0.5.10. That version falls within the vulnerable range (>=0.5.10 <0.5.18) for two advisories requiring a patched version of 0.6.0. Because 0.6.0 is a semver-major bump relative to the 0.5.x range, the declared spec was updated to ^0.6.0; npm install --package-lock-only resolved it to 0.6.0, satisfying both advisories.

Version changes

Package From To Why updated
tar ^7.5.37.5.6 resolved ^7.5.217.5.22 resolved Direct CVE fix (16 advisories)
adm-zip ^0.5.100.5.10 resolved ^0.6.00.6.0 resolved Direct CVE fix (2 advisories, major bump required)

Checklist

  • I've linked any associated issues to this PR.
  • I've tested my own changes.

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 (lockfile 7.5.22) and adm-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-zip 0.6.0 is a major bump. extractEntryTo now 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.

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.

0 participants