CVE-2001-1267 in tarinfo

Summary

by MITRE

Directory traversal vulnerability in GNU tar 1.13.19 and earlier allows local users to overwrite arbitrary files during archive extraction via a tar file whose filenames contain a .. (dot dot).

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 06/12/2019

The vulnerability described in CVE-2001-1267 represents a critical directory traversal flaw within GNU tar version 1.13.19 and earlier implementations. This security issue stems from inadequate validation of filenames during archive extraction processes, specifically when processing paths containing double dot sequences that indicate parent directory references. The flaw enables malicious actors to manipulate archive contents in ways that can result in arbitrary file overwrites on the target system. The vulnerability is particularly dangerous because it operates at the file system level during normal archive operations, making it difficult to detect and exploit without proper safeguards.

The technical implementation of this vulnerability resides in the path resolution logic of GNU tar's extraction mechanism. When tar encounters filenames containing .. sequences, the software fails to properly sanitize or validate these paths before attempting to write files to disk. This allows an attacker to construct malicious tar archives where filenames contain sequences like ../../etc/passwd or ../../../windows/system32/cmd.exe that would normally be prevented by proper path validation. The flaw essentially bypasses normal file system access controls and directory boundaries, enabling local users to write files to any location accessible by the tar process. This represents a classic directory traversal vulnerability pattern that has been documented across numerous systems and applications, aligning with CWE-22 directory traversal weaknesses and corresponding ATT&CK techniques for privilege escalation and persistence.

The operational impact of this vulnerability extends beyond simple file overwrites to encompass potential system compromise and data integrity violations. Local users can exploit this flaw to overwrite critical system files, configuration files, or even executable programs, potentially leading to privilege escalation or complete system compromise. The vulnerability affects any system running GNU tar versions prior to 1.13.20, making it widespread across many Unix-like systems and distributions. Attackers can leverage this weakness to place backdoors, modify system binaries, or corrupt critical infrastructure files, particularly when tar archives are processed by automated systems or untrusted users. The impact is amplified in environments where tar is used for automated deployment processes or where users have the ability to create or modify archive contents.

Mitigation strategies for CVE-2001-1267 primarily focus on upgrading to patched versions of GNU tar, specifically version 1.13.20 or later, which contain proper path validation and sanitization mechanisms. System administrators should also implement strict file access controls and monitoring for unusual file modification patterns, particularly around system directories. Additional protective measures include disabling the extraction of archives containing .. sequences, implementing proper input validation for all archive operations, and using alternative archive tools with better security track records. Organizations should conduct regular vulnerability assessments to identify systems running vulnerable versions of tar and ensure that all software updates are applied promptly. The remediation process should also include user education about safe archive handling practices and the potential risks of processing untrusted archive files, as this vulnerability can be exploited through social engineering or automated attacks targeting system administrators.

Disclosure

07/12/2001

Moderation

accepted

Entry

VDB-16990

CPE

ready

EPSS

0.01069

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!