Skip to content
OpenAdvisories
Medium · 5.5 CVE-2026-39243 EUVD-2026-42768GHSA-jwp9-9v96-94mx

decompress allows arbitrary hardlink creation during archive extraction

Published Jul 9, 2026 · Updated Jul 10, 2026 · Assigned by mitre

Description

decompress before 4.2.2 allows arbitrary hardlink creation during archive extraction, enabling file read disclosure and file corruption. When processing hardlink entries (type === 'link'), the x.linkname field from the archive is passed directly to fs.link() without validation (index.js line 113). An attacker can craft an archive with a hardlink entry whose linkname is an absolute path to any file on the same filesystem. This creates a hardlink inside the extraction directory that shares the same inode as the target file, enabling both reading and overwriting the original file's content. Hardlinks are limited to files on the same filesystem and cannot target directories.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 dotnet-hostfxr-8.0 +7 8.0.28-1.1.hum1 RHSA-2026:37577
Red Hat Hardened Images 1 dotnet8.0 +4 8.0.128-1.1.hum1 RHSA-2026:37577

Affected packages

EcosystemPackageAffectedFixedRecord
npm decompress <= 4.2.1 — GHSA-jwp9-9v96-94mx

Advisories 1

References