CVE-2018-1002207: Arbitrary File Write via Archive Extraction in github.com/mholt/archiver

github.com/mholt/archiver Updated 02 Oct 2025

Summary

21/08/2024
Yes i
Moderate
5.5

CVE-2018-1002207: Arbitrary File Write via Archive Extraction in mholt/archiver in github.com/mholt/archiver. Affects github.com/mholt/archiver versions < 2.1.0+incompatible. Fixed in 2.1.0+incompatible. 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 package github.com/mholt/archiver is a Go library that provides functionality for creating and extracting various archive formats. It is widely used in Go applications for handling file compression and decompression tasks. However, a vulnerability has been discovered in the package that allows arbitrary file write during the extraction process.

Vulnerability Detail

The vulnerability in github.com/mholt/archiver allows an attacker to write arbitrary files to the file system when extracting archives. This can lead to unauthorized modification or creation of files, potentially enabling further attacks or unauthorized access to sensitive information. The vulnerability originates from improper handling of file paths during the extraction process.

How To Fix

Latest published version: v3.1.1+incompatible as of 23 Oct 2026

go get github.com/mholt/archiver@v3.1.1+incompatible

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.1.0+incompatible

This is the first release that contains the fix.

go get github.com/mholt/archiver@v2.1.0+incompatible

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 crucial to update to the fixed version of the package to address the issue.

Conclusion

The vulnerability in github.com/mholt/archiver allows arbitrary file write during archive extraction, potentially leading to unauthorized file modification or creation. It is crucial to update the package to the fixed version to mitigate the vulnerability.

See every vulnerability recorded for github.com/mholt/archiver →

Share this vulnerability

FAQ

The vulnerability allows an attacker to write arbitrary files to the file system, potentially leading to unauthorized modification or creation of files.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your Gopkg.lock file to the playground and it will alert you if the vulnerability is present.

There are no known public exploits for this vulnerability at the moment. However, it is important to address the issue promptly by updating the package to the fixed version.

No, updating the package to the fixed version is the only known way to mitigate the vulnerability. It is recommended to update your application as soon as possible.

In addition to updating the package, it is always recommended to follow secure coding practices and perform regular security assessments of your application to identify and address any potential vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/mholt/archiver.

How To Fix

Latest published version: v3.1.1+incompatible as of 23 Oct 2026

go get github.com/mholt/archiver@v3.1.1+incompatible

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.1.0+incompatible

This is the first release that contains the fix.

go get github.com/mholt/archiver@v2.1.0+incompatible

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