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

Machine-generated threat intelligence

AILast updated: 02/28/2026, 11:01:04 UTC

Technical Analysis

CVE-2024-0406 is a path traversal vulnerability identified in version 3.0.0 of the mholt/archiver package, a widely used Go library for handling archive files. The flaw arises from improper limitation of pathnames during extraction, allowing specially crafted tar files to escape the intended extraction directory. When such a malicious tar archive is unpacked, it can overwrite or create files anywhere the user or application has write permissions. This can lead to unauthorized modification or disclosure of sensitive files, potentially compromising system integrity and confidentiality. The vulnerability requires the victim to unpack the crafted archive, implying user interaction and local access. The CVSS 3.1 base score is 6.1 (medium severity), reflecting low attack vector (local), low complexity, no privileges required, but user interaction needed. No known exploits have been reported in the wild as of the publication date. The vulnerability is particularly relevant for applications or services that automatically extract archives using this library without proper sanitization or validation of archive contents. Without mitigation, attackers could leverage this flaw to escalate privileges or manipulate critical files within the context of the vulnerable application or user account.

Potential Impact

The primary impact of CVE-2024-0406 is unauthorized file creation or overwriting, which threatens both confidentiality and integrity of affected systems. Attackers can potentially overwrite configuration files, inject malicious code, or access sensitive data by placing files outside the intended extraction directory. This can lead to privilege escalation if critical system or application files are modified, or data leakage if sensitive files are exposed. Since exploitation requires local access and user interaction, the threat is more significant in environments where untrusted users can upload or unpack archives, such as CI/CD pipelines, automated deployment systems, or user-facing applications handling archive uploads. Organizations relying on the vulnerable library for automated archive processing may face operational disruptions or security breaches if exploited. However, the lack of known exploits in the wild and the requirement for user interaction somewhat limit the immediacy of risk.

Mitigation Recommendations

To mitigate CVE-2024-0406, organizations should first update the mholt/archiver package to a patched version once available. In the interim, implement strict validation of archive contents before extraction, including sanitizing file paths to prevent directory traversal (e.g., rejecting paths containing '../' or absolute paths). Employ sandboxed or isolated environments for unpacking archives to limit potential damage from malicious files. Restrict permissions of the user or process performing extraction to the minimum necessary, preventing overwriting of critical files. Monitor and audit archive extraction activities for anomalies. Additionally, consider using alternative, well-maintained libraries with robust path traversal protections if patching is delayed. Educate developers and system administrators about the risks of unpacking untrusted archives and enforce policies to control archive sources and handling procedures.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to 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: 2/28/2026, 11:01:04 AM

Last updated: 3/21/2026, 1:56:07 PM

Views: 76

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 more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses