CVE-2026-18508
Medium · 4.4CVSS
4.4
EPSS
0.1%
Published
Aug 3, 2026
CISA due date
—
Cloudanix analysis
A flaw in the tar tool can let a specially made archive write files in places it should not when a certain extraction option is used, which could allow unwanted changes to files on the system.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Data Tampering
- Component
- Application
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
When extracting with --one-top-level, hardlink targets in a crafted archive are resolved relative to the current working directory instead of the designated top-level directory, allowing escape when a preexisting symlink is present under the working directory.
Why it matters to the business
Attackers can write files outside the intended extraction directory during a single archive extraction, potentially leading to unauthorized modification of system or application files on systems that process untrusted archives.
How an attack unfolds
An attacker creates a malicious archive containing hardlinks that point outside the extraction boundary. When a victim extracts it using the --one-top-level option in the presence of a preexisting symlink under the working directory, the hardlinks resolve outside the intended top-level directory and write to attacker-chosen locations.
How to fix it
Upgrade GNU tar to the fixed version 1.35-9.2.hum1 (RHSA-2026:50807) or later on Red Hat systems. Avoid extracting untrusted archives with --one-top-level until patched; consider using alternative extraction tools or sandboxed environments for untrusted content.
How to confirm the fix worked
Confirm the installed tar version is at least 1.35-9.2.hum1. Test extraction of a crafted archive containing hardlinks with --one-top-level and verify that files remain confined to the designated top-level directory.
Typical attack path
- Place a preexisting symbolic link under the extraction working directory pointing to a target outside the intended boundary.
- Craft an archive containing hardlinks whose targets resolve relative to the working directory rather than the top-level extraction directory.
- Deliver the archive to the victim and induce extraction with the --one-top-level option.
- Hardlinks are resolved during extraction, writing attacker-controlled content outside the designated directory.
How to detect it
Examine process execution logs and command history for invocations of tar with the --one-top-level flag against untrusted archives. Look for unexpected file creation or modification timestamps outside expected extraction directories following such operations.
What your security team should do
- Apply the vendor update to 1.35-9.2.hum1 immediately on all affected systems.
- Review and restrict use of --one-top-level when processing archives from untrusted sources.
- Monitor for new public exploit code or increased EPSS scores and reassess urgency if exploitation activity emerges.
The record
A flaw was found in GNU tar. When extracting an archive with the --one-top-level option, hardlink targets are not confined to the designated top-level directory and may resolve relative to the extraction working directory. A crafted archive can create hardlinks that escape the intended boundary and, when combined with a preexisting symbolic link under the working directory, may allow writing outside that boundary during a single extraction.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-119336 Pi-hole is a DNS sinkhole that protects devices from unwanted content without installing… CWE-59
- CVE-2026-119334 Pi-hole is a DNS sinkhole that protects devices from unwanted content without installing… CWE-59
- CVE-2026-116250 In server mode pgAdmin 4 validates a path a user gives for a file in their storage… CWE-59
- CVE-2026-119704 Bastille through 1.4.4 contains a symlink following vulnerability in the cp.sh, rcp.sh… CWE-59
- CVE-2026-119291 Zuke is a code-first, strongly typed build automation system for Deno. CWE-59
- CVE-2026-118990 CallBackery versions before 0.62.0 for Perl leave a world-readable dump of the… CWE-59
- CVE-2026-119364 ProFTPD through 1.3.9e and 1.3.10rc1 through 1.3.10rc4 contains a link-following… CWE-59
- CVE-2026-119168 HashiCorp Nomad and Nomad Enterprise are vulnerable to symlink following during… CWE-59