CVE-2020-7664: Path traversal in github.com/unknwon/cae

github.com/unknwon/cae Updated 02 Oct 2025

Summary

14/01/2022
Yes i
High
7.5

CVE-2020-7664: Path traversal in github.com/unknwon/cae. Affects github.com/unknwon/cae versions < 1.0.1. Fixed in 1.0.1. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The github.com/unknwon/cae package is a Go library that provides functionality for working with zip archives. It includes features for creating, opening, extracting, and manipulating zip files. The package is widely used in various Go projects for handling zip archives.

Vulnerability Detail

The vulnerability (CVE-2020-7664) in github.com/unknwon/cae is a path traversal issue. The ExtractTo function in the package does not securely escape file paths in zip archives, allowing an attacker to include leading or non-leading ".." in file paths. This can lead to unauthorized access or modification of files system-wide. An attacker could potentially add or replace files on the system, leading to various security risks and potential compromise of sensitive data.

How To Fix

Minimum fixed version

1.0.1

This is the first release that contains the fix.

go get github.com/unknwon/cae@v1.0.1

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

Workaround

There is no specific workaround mentioned for this vulnerability. However, developers can implement their own file path validation and sanitization mechanisms when working with zip archives to mitigate the risk of path traversal attacks.

Conclusion

The vulnerability (CVE-2020-7664) in github.com/unknwon/cae exposes the package to path traversal attacks, allowing unauthorized access or modification of files system-wide. To mitigate this risk, it is crucial to update to version 1.0.1 or later of the package and ensure that all dependencies are also updated. Developers should also follow best practices for secure file handling and implement file path validation and sanitization mechanisms. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for github.com/unknwon/cae →

Share this vulnerability

FAQ

The vulnerability allows an attacker to perform path traversal attacks, potentially leading to unauthorized access or modification of files system-wide.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. It analyzes your Gopkg.lock file and provides real-time alerts for open-source vulnerabilities in your software.

There are no known public exploits for this vulnerability at the moment. However, it is important to update to the latest version of the github.com/unknwon/cae package to mitigate the risk.

Yes, a fix is available in version 1.0.1 or later of the github.com/unknwon/cae package. It includes secure escaping of file paths in zip archives to prevent path traversal attacks.

If your application is affected by this vulnerability, you should update to the latest version of the github.com/unknwon/cae package and ensure that all dependencies are also updated. Additionally, you can follow best practices for secure file handling and implement file path validation and sanitization mechanisms.

References

Related vulnerabilities

Recent vulnerabilities recorded for github.com/unknwon/cae.

How To Fix

Minimum fixed version

1.0.1

This is the first release that contains the fix.

go get github.com/unknwon/cae@v1.0.1

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