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.
Published: 2026-07-09
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Based on the description, the npm package decompress is used in Node.js applications to extract archives, and it has a flaw before version 4.2.2. When a hardlink entry is encountered, the library calls fs.link with the linkname value taken directly from the archive, without performing any validation. An attacker can craft an archive where the linkname is an absolute path to an arbitrary file on the same filesystem. During extraction, that linkname creates a hardlink inside the extraction directory that shares the inode with the target file, thereby giving the process read and write access to that file. This vulnerability is a classic case of improper validation of file paths that can be used to create hardlinks (CWE‑59).

Affected Systems

Based on the description, the npm package decompress is used in Node.js applications to extract archives, and applications that import decompress prior to version 4.2.2 are affected. The flaw is independent of the operating system or Node.js runtime version and applies to any package that accepts untrusted archives and extracts them with decompress. Web services, file import utilities, installer scripts, and backup restore tools that rely on decompress therefore face the same risk if they are unable to guarantee archive integrity.

Risk and Exploitability

With a CVSS score of 5.5 the vulnerability is rated medium in severity, and the EPSS score of less than 1% indicates a low current exploitation probability. The issue is not listed in the CISA KEV catalog. Nonetheless, if an attacker can supply a malicious archive to the vulnerable application, they can read or overwrite any file the application’s user account can access. The attack requires local supply of a crafted archive and does not involve remote network access or privilege escalation beyond the application’s permissions.

Generated by OpenCVE AI on July 29, 2026 at 12:55 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the decompress package to version 4.2.2 or later, where hardlink creation is validated and restricted.
  • If an immediate upgrade is not feasible, run the application in a sandboxed environment (container, chroot, or with filesystem read‑only restrictions) and ensure it processes only trusted archives.
  • Apply an internal patch that validates hardlink targets: reject absolute paths and enforce that any linkname remains within the extraction directory before calling fs.link.
  • Optionally, restrict the underlying operating system from creating hardlinks for the process by disabling the link operation in the security policy or by using file system mount options that disallow hardlink creation.

Generated by OpenCVE AI on July 29, 2026 at 12:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 28 Jul 2026 16:15:00 +0000

Type Values Removed Values Added
Title decompress: Decompress: File disclosure and corruption via arbitrary hardlink creation
References
Metrics threat_severity

None

threat_severity

Moderate


Fri, 24 Jul 2026 09:00:00 +0000

Type Values Removed Values Added
Title Arbitrary Hardlink Creation in decompress Library Allows File Read Disclosure and Corruption

Tue, 21 Jul 2026 02:00:00 +0000

Type Values Removed Values Added
Title Arbitrary Hardlink Creation in decompress Library Allows File Read Disclosure and Corruption

Thu, 16 Jul 2026 21:00:00 +0000

Type Values Removed Values Added
Title Hardlink creation in Node.js decompress allows file read disclosure and corruption

Wed, 15 Jul 2026 05:30:00 +0000

Type Values Removed Values Added
Title Hardlink creation in Node.js decompress allows file read disclosure and corruption

Mon, 13 Jul 2026 21:15:00 +0000

Type Values Removed Values Added
Title Decompress Library Hardlink Vulnerability Allows File Read Disclosure and Corruption

Sun, 12 Jul 2026 07:45:00 +0000

Type Values Removed Values Added
Title Decompress Library Hardlink Vulnerability Allows File Read Disclosure and Corruption

Sat, 11 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
Title Arbitrary Hardlink Creation during Archive Extraction
Weaknesses CWE-36

Fri, 10 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-59
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 10 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
Title Arbitrary Hardlink Creation during Archive Extraction
Weaknesses CWE-36

Thu, 09 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Kevva
Kevva decompress
Vendors & Products Kevva
Kevva decompress

Thu, 09 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
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.
References

Subscriptions

Kevva Decompress
cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-07-10T15:25:09.237Z

Reserved: 2026-04-06T00:00:00.000Z

Link: CVE-2026-39243

cve-icon Vulnrichment

Updated: 2026-07-10T15:21:10.760Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-09T00:00:00Z

Links: CVE-2026-39243 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T13:00:16Z

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')