CVE-2005-1918

LOW2.6/ 10.0
Share:
Published: December 31, 2005 at 05:00 AM
Modified: April 3, 2025 at 01:03 AM
Source: secalert@redhat.com

Vulnerability Description

The original patch for a GNU tar directory traversal vulnerability (CVE-2002-0399) in Red Hat Enterprise Linux 3 and 2.1 uses an "incorrect optimization" that allows user-assisted attackers to overwrite arbitrary files via a crafted tar file, probably involving "/../" sequences with a leading "/".

CVSS Metrics

Base Score
2.6
Severity
LOW
Vector String
AV:N/AC:H/Au:N/C:N/I:P/A:N

Weaknesses (CWE)

Source: nvd@nist.gov

AI Security Analysis

01 // Technical Summary

GNU tar in Red Hat Enterprise Linux 3 and 2.1 is vulnerable to a directory traversal attack, allowing attackers to overwrite arbitrary files on the system. This vulnerability stems from an incorrect optimization in the original patch for a previous directory traversal issue, enabling attackers to craft malicious tar archives that write files outside of the intended directory, potentially leading to system compromise.

02 // Vulnerability Mechanism

Step 1: Payload Creation: The attacker crafts a malicious tar archive. This archive contains files with filenames designed to exploit the vulnerability. These filenames will include sequences like "/../" to traverse the directory structure and target specific files for overwriting.

Step 2: Archive Delivery: The attacker delivers the crafted tar archive to the vulnerable system. This could be achieved through various means, such as social engineering, web server compromise, or email attachments.

Step 3: User Interaction: A user on the vulnerable system, or an automated process, extracts the malicious tar archive using the vulnerable GNU tar utility.

Step 4: Path Traversal: During extraction, the vulnerable GNU tar fails to properly sanitize the filenames within the archive. The "/../" sequences are not correctly resolved, allowing the extraction process to write files outside of the intended directory.

Step 5: File Overwrite: The extraction process overwrites the target files specified in the crafted filenames. This could include critical system files, configuration files, or other sensitive data, depending on the attacker's objectives.

03 // Deep Technical Analysis

The vulnerability lies in the flawed implementation of a security patch intended to prevent directory traversal in GNU tar. The original patch, designed to mitigate CVE-2002-0399, introduced an "incorrect optimization" that failed to properly sanitize file paths extracted from a crafted tar archive. Specifically, the patch's logic for handling paths containing sequences like "/../" with a leading "/" was insufficient. The flawed code likely did not correctly normalize the path, allowing an attacker to construct a tar archive with filenames that, when extracted, would write files to arbitrary locations on the filesystem. This is a classic example of a path traversal vulnerability, where the software does not properly validate user-supplied input (the filenames within the tar archive) before using it to access the file system. The root cause is a logic error in the path sanitization routine, leading to a write-what-where condition.

References & Intelligence

ftp://patches.sgi.com/support/free/security/advisories/20060301-01.U.asc
Source: secalert@redhat.com
http://secunia.com/advisories/18988
Source: secalert@redhat.com
PatchVendor Advisory
http://secunia.com/advisories/19130
Source: secalert@redhat.com
Vendor Advisory
http://secunia.com/advisories/19183
Source: secalert@redhat.com
PatchVendor Advisory
http://secunia.com/advisories/20397
Source: secalert@redhat.com
Vendor Advisory
http://securitytracker.com/id?1015655
Source: secalert@redhat.com
Patch
http://support.avaya.com/elmodocs2/security/ASA-2006-110.htm
Source: secalert@redhat.com
http://www.novell.com/linux/security/advisories/2006_05_sr.html
Source: secalert@redhat.com
Vendor Advisory
http://www.redhat.com/support/errata/RHSA-2006-0195.html
Source: secalert@redhat.com
PatchVendor Advisory
http://www.securityfocus.com/archive/1/430297/100/0/threaded
Source: secalert@redhat.com
http://www.securityfocus.com/bid/5834
Source: secalert@redhat.com
Patch
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=140589
Source: secalert@redhat.com
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A9946
Source: secalert@redhat.com
ftp://patches.sgi.com/support/free/security/advisories/20060301-01.U.asc
Source: af854a3a-2127-422b-91ae-364da2661108
http://secunia.com/advisories/18988
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
http://secunia.com/advisories/19130
Source: af854a3a-2127-422b-91ae-364da2661108
Vendor Advisory
http://secunia.com/advisories/19183
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
http://secunia.com/advisories/20397
Source: af854a3a-2127-422b-91ae-364da2661108
Vendor Advisory
http://securitytracker.com/id?1015655
Source: af854a3a-2127-422b-91ae-364da2661108
Patch
http://support.avaya.com/elmodocs2/security/ASA-2006-110.htm
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.novell.com/linux/security/advisories/2006_05_sr.html
Source: af854a3a-2127-422b-91ae-364da2661108
Vendor Advisory
http://www.redhat.com/support/errata/RHSA-2006-0195.html
Source: af854a3a-2127-422b-91ae-364da2661108
PatchVendor Advisory
http://www.securityfocus.com/archive/1/430297/100/0/threaded
Source: af854a3a-2127-422b-91ae-364da2661108
http://www.securityfocus.com/bid/5834
Source: af854a3a-2127-422b-91ae-364da2661108
Patch
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=140589
Source: af854a3a-2127-422b-91ae-364da2661108
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A9946
Source: af854a3a-2127-422b-91ae-364da2661108
CVE-2005-1918 - LOW Severity (2.6) | Free CVE Database | 4nuxd