Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-0406: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

0
Medium
VulnerabilityCVE-2024-0406cvecve-2024-0406
Published: Sat Apr 06 2024 (04/06/2024, 16:11:02 UTC)
Source: CVE

Description

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.

AI-Powered Analysis

AILast updated: 11/20/2025, 19:00:37 UTC

Technical Analysis

CVE-2024-0406 is a path traversal vulnerability identified in the mholt/archiver package version 3.0.0, a widely used Go library for handling archive files. The flaw arises from improper limitation of pathnames during the extraction of tar files, allowing attackers to craft specially designed tar archives that include file paths referencing directories outside the intended extraction directory. When such a malicious archive is unpacked, it can lead to unauthorized creation or overwriting of files anywhere the unpacking process has write permissions. This can compromise the confidentiality and integrity of the system by exposing or altering sensitive files. The vulnerability requires local access to supply the malicious archive and user interaction to trigger the unpacking process. The CVSS 3.1 score of 6.1 reflects a medium severity, with attack vector local, low attack complexity, no privileges required, but user interaction needed. There is no indication of known exploits in the wild yet. The issue is particularly relevant for applications or services that automatically unpack user-supplied tar files without sufficient validation or sandboxing. The flaw can be exploited to escalate privileges indirectly by overwriting configuration files or injecting malicious code into trusted locations. The vulnerability was reserved in January 2024 and published in April 2024, with no official patch links provided yet, suggesting that remediation may require updating to a fixed version once available or applying manual mitigations.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to software development environments, CI/CD pipelines, and cloud services that utilize the mholt/archiver package to handle tar archives. If exploited, attackers could overwrite critical configuration files or inject malicious payloads, leading to data breaches or system compromise. Confidentiality is impacted by potential unauthorized file access, and integrity is affected by the ability to modify or replace files. Availability is not directly impacted. Organizations relying on automated unpacking of archives from untrusted sources are at higher risk. The vulnerability could facilitate lateral movement or privilege escalation within internal networks if attackers gain initial access. Given the medium severity and requirement for local access and user interaction, the threat is moderate but should not be ignored in environments with high automation or where untrusted archives are processed. Failure to address this vulnerability could lead to compliance issues under GDPR if personal data is exposed or altered.

Mitigation Recommendations

1. Monitor for and apply official patches or updates to the mholt/archiver package as soon as they become available. 2. Implement strict validation of archive contents before extraction, including checking for path traversal patterns such as '../' sequences. 3. Use sandboxed or isolated environments for unpacking archives to limit the impact of potential exploitation. 4. Restrict file system permissions for processes that unpack archives, ensuring they cannot write outside designated directories. 5. Employ application-level whitelisting to allow only trusted archive sources. 6. Incorporate runtime detection mechanisms to monitor unexpected file creation or modification during archive extraction. 7. Educate developers and system administrators about the risks of unpacking untrusted archives and enforce secure coding and deployment practices. 8. Consider alternative libraries or tools with built-in protections against path traversal if immediate patching is not feasible.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
redhat
Date Reserved
2024-01-10T18:18:28.288Z
Cisa Enriched
true

Threat ID: 682d983ec4522896dcbefacd

Added to database: 5/21/2025, 9:09:18 AM

Last enriched: 11/20/2025, 7:00:37 PM

Last updated: 11/28/2025, 8:25:15 PM

Views: 45

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats