CVE-2020-7667: Arbitrary File Write via Archive Extraction (Zip Slip) in github.com/sassoftware/go-rpmutils

Summary

14/04/2021
Yes i
High
7.5

CVE-2020-7667: Arbitrary File Write via Archive Extraction (Zip Slip) in github.com/sassoftware/go-rpmutils. Affects github.com/sassoftware/go-rpmutils versions < 0.1.0. Fixed in 0.1.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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

github.com/sassoftware/go-rpmutils is a Go package that provides utilities for working with RPM (Red Hat Package Manager) files. It allows users to extract files from RPMs and perform various operations on them. However, a vulnerability has been discovered in the package that can lead to arbitrary file write when extracting RPMs with relative file paths.

Vulnerability Detail

The vulnerability (CVE-2020-7667) arises from improper path sanitization in go-rpmutils. When an RPM containing relative file paths is extracted, it can cause files to be written or overwritten outside of the intended target directory. This can potentially lead to unauthorized modification or deletion of files on the system. The issue stems from a lack of proper validation and sanitization of file paths during the extraction process.

How To Fix

Minimum fixed version

0.1.0

This is the first release that contains the fix.

go get github.com/sassoftware/go-rpmutils@v0.1.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 fixed version of the package as soon as possible.

Conclusion

The vulnerability (CVE-2020-7667) in github.com/sassoftware/go-rpmutils allows for arbitrary file write when extracting RPMs with relative file paths. This can lead to unauthorized modification or deletion of files on the system. To mitigate this vulnerability, users should update to version 0.1.0 or later of the go-rpmutils package. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/sassoftware/go-rpmutils →

Share this vulnerability

FAQ

The vulnerability allows an attacker to write or overwrite files outside of the intended target directory. This can potentially lead to unauthorized modification or deletion of files on the system.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply provide your Gopkg.lock file and it will analyze your dependencies for any known vulnerabilities, including this one.

Yes, a fix is available in version 0.1.0 of the go-rpmutils package. It is recommended to update to this version or later to mitigate the vulnerability.

There are no known exploits for this vulnerability at the time of this report. However, it is important to update to the fixed version of the package to prevent any potential exploitation.

Unfortunately, there are no known mitigations for this vulnerability. It is recommended to update to the fixed version of the package as soon as possible.

References

How To Fix

Minimum fixed version

0.1.0

This is the first release that contains the fix.

go get github.com/sassoftware/go-rpmutils@v0.1.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