CVE-2025-45582

GNU Tar through 1.35 allows file overwrite via directory traversal in crafted TAR archives, with a certain two-step process. First, the victim must extract an archive that contains a ../ symlink to a critical directory. Second, the victim must extract an archive that contains a critical file, specified via a relative pathname that begins with the symlink name and ends with that critical file's name. Here, the extraction follows the symlink and overwrites the critical file. This bypasses the protection mechanism of "Member name contains '..'" that would occur for a single TAR archive that attempted to specify the critical file via a ../ approach. For example, the first archive can contain "x -> ../../../../../home/victim/.ssh" and the second archive can contain x/authorized_keys. This can affect server applications that automatically extract any number of user-supplied TAR archives, and were relying on the blocking of traversal. This can also affect software installation processes in which "tar xf" is run more than once (e.g., when installing a package can automatically install two dependencies that are set up as untrusted tarballs instead of official packages).
References
Link Resource
https://github.com/i900008/vulndb/blob/main/Gnu_tar_vuln.md Exploit Third Party Advisory
https://www.gnu.org/software/tar/ Product Release Notes
Configurations

Configuration 1 (hide)

cpe:2.3:a:gnu:tar:*:*:*:*:*:*:*:*

History

17 Jul 2025, 13:09

Type Values Removed Values Added
CPE cpe:2.3:a:gnu:tar:*:*:*:*:*:*:*:*
First Time Gnu tar
Gnu
References () https://github.com/i900008/vulndb/blob/main/Gnu_tar_vuln.md - () https://github.com/i900008/vulndb/blob/main/Gnu_tar_vuln.md - Exploit, Third Party Advisory
References () https://www.gnu.org/software/tar/ - () https://www.gnu.org/software/tar/ - Product, Release Notes

15 Jul 2025, 13:14

Type Values Removed Values Added
Summary
  • (es) Las versiones GNU Tar hasta la 1.35 permiten la sobrescritura de archivos mediante el directory traversal en archivos TAR manipulado, con un proceso de dos pasos. Primero, la víctima debe extraer un archivo que contenga un enlace simbólico ../ a un directorio crítico. Segundo, la víctima debe extraer un archivo que contenga un archivo crítico, especificado mediante una ruta relativa que comienza con el nombre del enlace simbólico y termina con el nombre de dicho archivo crítico. En este caso, la extracción sigue el enlace simbólico y sobrescribe el archivo crítico. Esto evita el mecanismo de protección "El nombre del miembro contiene '..'" que se aplicaría a un solo archivo TAR que intentara especificar el archivo crítico mediante un enfoque ../. Por ejemplo, el primer archivo puede contener "x -> ../../../../../home/victim/.ssh" y el segundo puede contener x/authorized_keys. Esto puede afectar a las aplicaciones de servidor que extraen automáticamente cualquier número de archivos TAR proporcionados por el usuario y que dependían del bloqueo del recorrido. Esto también puede afectar los procesos de instalación de software en los que "tar xf" se ejecuta más de una vez (por ejemplo, al instalar un paquete, se pueden instalar automáticamente dos dependencias que están configuradas como archivos tar no confiables en lugar de paquetes oficiales).

11 Jul 2025, 18:15

Type Values Removed Values Added
Summary (en) GNU Tar through 1.35 allows file overwrite via directory traversal in crafted TAR archives, with a certain two-step process. First, the victim must extract an archive that contains a ../ symlink to a critical directory. Second, the victim must extract an archive that contains a critical file, specified via a relative pathname that begins with the symlink name and ends with that critical file's name. Here, the extraction follows the symlink and overwrites the critical file. This bypasses the protection mechanism of "Member name contains '..'" that would occur for a single TAR archive that attempted to specify the critical file via a ../ approach. For example, the first archive can contain "x -> ../../../../../home/victim/.ssh" and the second archive can contain x/authorized_keys. This can affect server applications that automatically extract any number of user-supplied TAR archives, and were relying on the blocking of traversal. (en) GNU Tar through 1.35 allows file overwrite via directory traversal in crafted TAR archives, with a certain two-step process. First, the victim must extract an archive that contains a ../ symlink to a critical directory. Second, the victim must extract an archive that contains a critical file, specified via a relative pathname that begins with the symlink name and ends with that critical file's name. Here, the extraction follows the symlink and overwrites the critical file. This bypasses the protection mechanism of "Member name contains '..'" that would occur for a single TAR archive that attempted to specify the critical file via a ../ approach. For example, the first archive can contain "x -> ../../../../../home/victim/.ssh" and the second archive can contain x/authorized_keys. This can affect server applications that automatically extract any number of user-supplied TAR archives, and were relying on the blocking of traversal. This can also affect software installation processes in which "tar xf" is run more than once (e.g., when installing a package can automatically install two dependencies that are set up as untrusted tarballs instead of official packages).

11 Jul 2025, 17:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-07-11 17:15

Updated : 2025-07-17 13:09


NVD link : CVE-2025-45582

Mitre link : CVE-2025-45582

CVE.ORG link : CVE-2025-45582


JSON object : View

Products Affected

gnu

  • tar
CWE
CWE-24

Path Traversal: '../filedir'