CVE-2020-36561: Path Traversal Vulnerability in github.com/yi-ge/unzip

github.com/yi-ge/unzip Updated 02 Oct 2025

Summary

28/12/2022
Yes i
Critical
9.1

CVE-2020-36561: Unzip vulnerable to path traversal. Affects github.com/yi-ge/unzip versions < 1.0.3-0.20200308084313-2adbaa4891b9. Fixed in 1.0.3-0.20200308084313-2adbaa4891b9. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The package github.com/yi-ge/unzip is a Go library that provides functionality for extracting files from ZIP archives. It is commonly used in Go applications to handle file compression and decompression tasks. However, a vulnerability has been discovered in the package that allows for path traversal attacks. This means that an attacker can manipulate the file paths in a ZIP archive to write or overwrite files outside of the intended target directory.

Vulnerability Detail

The vulnerability in github.com/yi-ge/unzip arises from improper path sanitization. When processing ZIP archives, the package fails to properly validate and sanitize file paths, allowing for the inclusion of relative paths that can escape the target directory. As a result, an attacker can craft a malicious ZIP archive that, when extracted using the vulnerable library, can write or overwrite 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 the library is used.

How To Fix

Minimum fixed version

1.0.3-0.20200308084313-2adbaa4891b9

This is the first release that contains the fix.

go get github.com/yi-ge/unzip@v1.0.3-0.20200308084313-2adbaa4891b9

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 fixed version of github.com/yi-ge/unzip as soon as possible.

Conclusion

The path traversal vulnerability in github.com/yi-ge/unzip can have serious security implications, allowing attackers to write or overwrite files outside of the intended target directory. It is crucial for developers to update to the fixed version of the package to ensure the secure processing of ZIP archives. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/yi-ge/unzip →

Share this vulnerability

FAQ

The vulnerability allows an attacker to write or overwrite files outside of the target directory when processing ZIP archives using github.com/yi-ge/unzip. This can lead to unauthorized access, data leakage, or remote code execution depending on the context.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your Gopkg.lock file and the playground will analyze it for any open-source vulnerabilities, including this one.

At the time of this report, there are no known public exploits specifically targeting this vulnerability. However, it is important to update to the fixed version of github.com/yi-ge/unzip to mitigate the risk of potential attacks.

No, the only way to fully mitigate the risk is to update to the fixed version of github.com/yi-ge/unzip. Patching or modifying the vulnerable code manually may introduce other issues and is not recommended.

You can find more information about this vulnerability, including technical details and the fixed version, in the vulnerability report at https://pkg.go.dev/vuln/GO-2020-0035.

How To Fix

Minimum fixed version

1.0.3-0.20200308084313-2adbaa4891b9

This is the first release that contains the fix.

go get github.com/yi-ge/unzip@v1.0.3-0.20200308084313-2adbaa4891b9

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