CVE-2016-6321
High · 7.5CVSS
7.5
EPSS
15.7%
Published
Dec 9, 2016
CISA due date
—
Cloudanix analysis
A flaw in the common tar tool for unpacking file archives could let attackers secretly overwrite important files on a computer when someone extracts a specially made archive.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Application
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The safer_name_suffix function in GNU tar fails to properly sanitize the file_name parameter, allowing directory traversal sequences to bypass intended extraction protections and write files to arbitrary locations on the filesystem.
Why it matters to the business
Attackers can overwrite critical configuration, binary, or data files on systems that extract untrusted archives, leading to system compromise, data corruption, or service disruption; as tar is a foundational tool with broad ecosystem use, exposure affects many downstream applications and environments.
How an attack unfolds
An attacker creates a specially crafted tar archive containing a filename with traversal elements that evade the sanitization logic; the archive is delivered to a target system (via download, email, or supply chain); when extracted with a vulnerable tar version, files are written outside the intended directory, enabling arbitrary file writes that can be leveraged for further access or persistence.
How to fix it
Upgrade GNU tar to a fixed release containing the safer_name_suffix correction (post-1.29, including the referenced commit 7340f67b9860ea0531c1450e5aa261c50f67165d or equivalent); rebuild or replace affected packages such as eks-distro-coredns-1.9 with patched versions; avoid extracting untrusted archives until updated.
How to confirm the fix worked
Verify installed tar version is newer than 1.29 or contains the safer_name_suffix fix; test extraction of known traversal archives in a controlled environment to confirm writes are contained; review build logs or package manifests for the applied commit.
Typical attack path
- Craft malicious tar archive embedding traversal in file_name
- Deliver archive to target via network or supply chain
- Induce extraction on vulnerable GNU tar (1.14-1.29)
- Bypass sanitization and achieve arbitrary file write
- Leverage written files for code execution or persistence
How to detect it
Review system and application logs for tar extraction events involving archives with suspicious filenames containing dot-dot sequences; correlate with unexpected file modifications outside expected directories; examine process execution of tar during file writes.
What your security team should do
- Prioritize patching all GNU tar instances to fixed versions within 30 days given public exploit availability
- Inventory systems and containers using tar for archive handling
- Implement archive extraction sandboxing or validation wrappers until patches are applied
- Monitor EPSS trend and update threat models for path traversal vectors
The record
Directory traversal vulnerability in the safer_name_suffix function in GNU tar 1.14 through 1.29 might allow remote attackers to bypass an intended protection mechanism and write to arbitrary files via vectors related to improper sanitization of the file_name parameter, aka POINTYFEATHER.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.10 | tar | 0 | 1.29-r1 |
| Alpine:v3.11 | tar | 0 | 1.29-r1 |
| Alpine:v3.12 | tar | 0 | 1.29-r1 |
| Alpine:v3.13 | tar | 0 | 1.29-r1 |
| Alpine:v3.14 | tar | 0 | 1.29-r1 |
| Alpine:v3.15 | tar | 0 | 1.29-r1 |
| Alpine:v3.16 | tar | 0 | 1.29-r1 |
| Alpine:v3.17 | tar | 0 | 1.29-r1 |
| Alpine:v3.18 | tar | 0 | 1.29-r1 |
| Alpine:v3.19 | tar | 0 | 1.29-r1 |
| Alpine:v3.20 | tar | 0 | 1.29-r1 |
| Alpine:v3.21 | tar | 0 | 1.29-r1 |
| Alpine:v3.22 | tar | 0 | 1.29-r1 |
| Alpine:v3.4 | tar | 0 | 1.29-r1 |
| Alpine:v3.5 | tar | 0 | 1.29-r1 |
| Alpine:v3.6 | tar | 0 | 1.29-r1 |
| Alpine:v3.7 | tar | 0 | 1.29-r1 |
| Alpine:v3.8 | tar | 0 | 1.29-r1 |
| Alpine:v3.9 | tar | 0 | 1.29-r1 |
| Debian:11 | tar | 0 | 1.29b-1.1 |
| Debian:12 | tar | 0 | 1.29b-1.1 |
| Debian:13 | tar | 0 | 1.29b-1.1 |
| Debian:7 | tar | 0 | 1.26+dfsg-0.1+deb7u1 |
| Debian:8 | tar | 0 | 1.27.1-2+deb8u1 |
| Mageia:5 | tar | 0 | 1.28-3.1.mga5 |
| SUSE:Linux Enterprise Desktop 12 SP1 | tar | 0 | 1.27.1-11.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | tar | 0 | 1.27.1-11.1 |
| SUSE:Linux Enterprise Server 11 SP4 | tar | 0 | 1.26-1.2.10.1 |
| SUSE:Linux Enterprise Server 12 SP1 | tar | 0 | 1.27.1-11.1 |
| SUSE:Linux Enterprise Server 12 SP2 | tar | 0 | 1.27.1-11.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | tar | 0 | 1.27.1-11.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | tar | 0 | 1.26-1.2.10.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | tar | 0 | 1.27.1-11.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | tar | 0 | 1.27.1-11.1 |
| Ubuntu:14.04:LTS | tar | 0 | 1.27.1-1ubuntu0.1 |
| Ubuntu:16.04:LTS | tar | 0 | 1.28-2.1ubuntu0.1 |
| openSUSE:Tumbleweed | tar | 0 | 1.29-2.1 |
Related vulnerabilities
- CVE-2023-39804 In GNU tar before 1.35, mishandled extension attributes in a PAX archive can lead to an… Also affects tar
- CVE-2010-0624 Heap-based buffer overflow in the rmt_read__ function in lib/rtapelib.c in the rmt client… Also affects tar
- CVE-2007-4476 Buffer overflow in the safer_name_suffix function in GNU tar has unspecified attack… Also affects tar
- CVE-2006-6097 GNU tar 1.16 and 1.15.1, and possibly other versions, allows user-assisted attackers to… Also affects tar
- CVE-2026-5704 A flaw was found in tar. Also affects tar
- CVE-2026-81163 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')… CWE-22
- CVE-2026-112049 Vita3K before build 4187 contains a path traversal (zip slip) vulnerability in… CWE-22
- CVE-2026-112005 WhoDB 0.104.0 before 0.135.0 contains a path traversal vulnerability that allows remote… CWE-22