CVE-2024-0406: Github.com/mholt/archiver/v3 Path Traversal Vulnerability
MODERATECVE-2024-0406 is a MODERATE (CVSS 6.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/mholt/archiver/v3 libraries in the Go ecosystem. The issue involves archiver path traversal vulnerability. Remediation is available in the latest vendor maintenance releases.
CVE-2024-0406 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N).
How to Fix CVE-2024-0406
To remediate this vulnerability, upgrade all affected Github.com/mholt/archiver/v3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/mholt/archiver/v3 to Latest secure release
Upgrade github.com/mholt/archiver to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/mholt/archiver/v3
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-0406, inspect your project dependencies for Github.com/mholt/archiver/v3:
inspect dependencies for github.com/mholt/archiver/v3
Analyze the terminal output to locate any version of Github.com/mholt/archiver/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/mholt/archiver/v3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-0406 Affected Github.com/mholt/archiver/v3 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/mholt/archiver/v3
|
Go |
≥ 3.0.0
≤ 3.5.1
|
|
|
github.com/mholt/archiver
|
Go |
≥ 3.0.0
≤ 3.5.1
|
|
References
Frequently Asked Questions
What is CVE-2024-0406?
Which Github.com/mholt/archiver/v3 versions are affected?
What version fixes CVE-2024-0406?
Is github.com/mholt/archiver/v3 affected?
Is github.com/mholt/archiver affected?
What is the CVSS score of CVE-2024-0406?
What CWE is associated with CVE-2024-0406?
How can I check Go dependencies for CVE-2024-0406?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rhh4-rh7c-7r5v",
"modified" : "2025-05-07T01:45:49Z",
"published" : "2024-04-06T18:31:17Z",
"aliases" : [ "CVE-2024-0406" ],
"summary" : "Archiver Path Traversal vulnerability",
"details" : "A flaw was discovered in the mholt/archiver package. This flaw allows an attacker to create a specially crafted tar file, which, when unpacked, may allow access to restricted files or directories. This issue can allow the creation or overwriting of files with the user's or application's privileges using the library.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/mholt/archiver/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"last_affected" : "3.5.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/mholt/archiver"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"last_affected" : "3.5.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-0406"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2025:2449"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2024-0406"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2257749"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mholt/archiver"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-2698"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-08T15:44:41Z",
"nvd_published_at" : "2024-04-06T17:15:07Z"
}
}