CVE-2020-36560: Path Traversal Vulnerability in go-unzip

github.com/artdarek/go-unzip Updated 02 Oct 2025

Summary

28/12/2022
Yes i
Critical
9.1

CVE-2020-36560: go-unzip vulnerable to Path Traversal. Affects github.com/artdarek/go-unzip versions < 2.0.0. Fixed in 2.0.0. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

go-unzip is a Go package that provides functionality for extracting files from zip archives. It is commonly used in Go applications to handle file compression and extraction. However, a vulnerability has been discovered in go-unzip that allows for path traversal attacks. This vulnerability arises from improper path sanitization, which can result in files being written or overwritten outside of the intended target directory.

Vulnerability Detail

The path traversal vulnerability in go-unzip allows an attacker to manipulate file paths within a zip archive to access files outside of the target directory. By crafting a malicious zip archive with relative file paths, an attacker can overwrite or create files in arbitrary locations on the file system. This can lead to unauthorized access, data leakage, or even remote code execution depending on the context in which go-unzip is used.

How To Fix

Minimum fixed version

2.0.0

This is the first release that contains the fix.

go get github.com/artdarek/go-unzip@v2.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to update to the latest version of go-unzip as soon as possible.

Conclusion

The path traversal vulnerability in go-unzip can have serious security implications for applications that use this package. It is crucial to update to the latest version of go-unzip to mitigate the risk of path traversal attacks. For further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for github.com/artdarek/go-unzip →

Share this vulnerability

FAQ

go-unzip is a Go package that provides functionality for extracting files from zip archives.

This vulnerability allows an attacker to write or overwrite files outside of the intended target directory, potentially leading to unauthorized access, data leakage, or remote code execution.

To fix this vulnerability, update your usage of go-unzip to version 1.0.0 or above.

There is no known workaround for this vulnerability. It is recommended to update to the latest version of go-unzip.

You can find more information about this vulnerability in the CVE-2020-36560 advisory or on the Vulert website.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

2.0.0

This is the first release that contains the fix.

go get github.com/artdarek/go-unzip@v2.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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