---
id: CVE-2026-39246
title: >-
  decompress before 4.2.2 allows arbitrary symlink creation during archive
  extraction
summary: >-
  decompress before 4.2.2 allows arbitrary symlink creation during archive
  extraction. When processing symlink entries (type === 'symlink'), the
  x.linkname field from the archive is passed directly to fs.symlink() without
  validation (index…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N'
cwe:
  - CWE-59
vendor: decompress_project
product: decompress
affected:
  - decompress <= 4.2.1
published: '2026-07-09'
updated: '2026-07-13'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-39246'
references:
  - url: 'https://github.com/kevva/decompress'
    label: cve@mitre.org
  - url: 'https://github.com/kevva/decompress/issues/114'
    label: cve@mitre.org
  - url: 'https://www.npmjs.com/package/decompress'
    label: cve@mitre.org
  - url: 'https://github.com/kevva/decompress/issues/114'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
epss: 0.00658
epssPercentile: 0.49295
ingestedAt: '2026-07-13T13:27:18.474Z'
---

## Overview

decompress before 4.2.2 allows arbitrary symlink creation during archive extraction. When processing symlink entries (type === 'symlink'), the x.linkname field from the archive is passed directly to fs.symlink() without validation (index.js line 121). The preventWritingThroughSymlink check on line 98 only applies to file entries, not symlink creation. An attacker can craft an archive with symlink entries pointing to sensitive files outside the extraction directory (e.g., /etc/passwd), enabling information disclosure when the application reads the extracted contents.

## Affected

- `decompress <= 4.2.1`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
