Arbitrary File Overwrite in decompress-zip

decompress-zip Updated 02 Oct 2025

Summary

02/09/2020
HIGH
Yes i
High
Not published

GHSA-73v8-v6g4-vrpm: Arbitrary File Overwrite in decompress-zip. Affects decompress-zip across 2 version ranges.

< 0.2.2 >= 0.3.0, < 0.3.2

Fixed in 0.2.2 or 0.3.2, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The decompress-zip package is an npm package used for extracting files from zip archives. It provides a simple and convenient way to decompress zip files in Node.js applications. However, vulnerable versions of decompress-zip are affected by the Zip-Slip vulnerability, which is an arbitrary file write vulnerability. This vulnerability arises because decompress-zip fails to verify that extracted files do not resolve to targets outside of the extraction root directory.

Vulnerability Detail

The Zip-Slip vulnerability in decompress-zip allows an attacker to overwrite arbitrary files on the system by crafting a malicious zip archive. By including file paths with '../' or similar directory traversal sequences in the zip file, an attacker can trick decompress-zip into extracting files to unintended locations. This can lead to various security issues, such as overwriting critical system files or injecting malicious code into existing files.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 0.2.2 0.2.2
    npm install decompress-zip@0.2.2
  • >= 0.3.0, < 0.3.2 0.3.2
    npm install decompress-zip@0.3.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to upgrade to the fixed versions of decompress-zip to mitigate the risk of arbitrary file overwrite.

Conclusion

The Zip-Slip vulnerability in decompress-zip exposes applications to the risk of arbitrary file overwrite. To mitigate this vulnerability, it is crucial to upgrade to the latest patched versions of decompress-zip. Additionally, using tools like Vulert can help identify and monitor open-source vulnerabilities in your software. For further support on vulnerability remediation or any other security concerns, feel free to contact DevNack.com.

See every vulnerability recorded for decompress-zip →

Share this vulnerability

FAQ

This vulnerability allows an attacker to overwrite arbitrary files on the system, potentially leading to unauthorized access, data loss, or the execution of malicious code.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will analyze it for any open-source vulnerabilities, including this one.

Yes, there have been reported instances of attackers exploiting the Zip-Slip vulnerability in other packages. It is important to promptly update to the fixed versions of decompress-zip to prevent potential attacks.

While it is possible to manually validate the extracted file paths, it is highly recommended to upgrade to the fixed versions of decompress-zip instead. The fixed versions implement proper validation techniques to prevent directory traversal attacks.

For further support on vulnerability remediation or any other security concerns, you can reach out to info@devnack.com. Our team of experts will be happy to assist you.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 0.2.2 0.2.2
    npm install decompress-zip@0.2.2
  • >= 0.3.0, < 0.3.2 0.3.2
    npm install decompress-zip@0.3.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback