CVE-2026-41991
JSON

2.0low

Predictable Temporary File in GNU gzip

Severity
2.0low CVSS:4.0 by CERT-PL
Exploit likelihood
0.12% (higher than 1% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
CERT-PL

Description

GNU gzip contains a vulnerability in the gzexe utility related to insecure temporary file handling. When the mktemp utility is not available in the user’s PATH, gzexe falls back to constructing a temporary file path based solely on the process ID (PID). This predictable filename is created without exclusive access or existence checks. A local attacker can pre‑create the predicted temporary file path as a symbolic link pointing to an arbitrary file writable by the victim. When gzexe runs, it follows the symlink and overwrites the target file, resulting in a time‑of‑check to time‑of‑use (TOCTOU) condition that allows arbitrary file overwrite. This issue has been fixed in the commit 4e6f8b24ab823146ab8776f0b7fe486ab34d4269

Affected

Product or packageVersionsReported by
GNU gzipup to 1.14CVE List, NVD

All scores

CERT-PL2.0low CVSS:4.0CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
NVD4.7medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N

Classification

CWE-377

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

GNU gzip contains a vulnerability in the gzexe utility related to insecure temporary file handling. When the mktemp utility is not available in the user’s PATH, gzexe falls back to constructing a temporary file path based solely on the process ID (PID). This predictable filename is created without exclusive access or existence checks. A local attacker can pre‑create the predicted temporary file path as a symbolic link pointing to an arbitrary file writable by the victim. When gzexe runs, it follows the symlink and overwrites the target file, resulting in a time‑of‑check to time‑of‑use (TOCTOU) condition that allows arbitrary file overwrite. This issue has been fixed in the commit 4e6f8b24ab823146ab8776f0b7fe486ab34d4269

NVD (es)

GNU gzip contiene una vulnerabilidad en la utilidad gzexe relacionada con el manejo inseguro de archivos temporales. Cuando la utilidad mktemp no está disponible en el PATH del usuario, gzexe recurre a la construcción de una ruta de archivo temporal basada únicamente en el ID de proceso (PID). Este nombre de archivo predecible se crea sin acceso exclusivo ni comprobaciones de existencia. Un atacante local puede pre-crear la ruta de archivo temporal predicha como un enlace simbólico que apunta a un archivo arbitrario escribible por la víctima. Cuando gzexe se ejecuta, sigue el enlace simbólico y sobrescribe el archivo de destino, lo que resulta en una condición de tiempo de verificación a tiempo de uso (TOCTOU) que permite la sobrescritura arbitraria de archivos. Este problema ha sido corregido en el commit 4e6f8b24ab823146ab8776f0b7fe486ab34d4269

References

Sources

SourceRecordLicence
CVE ListCVE-2026-41991 changed 2026-06-29CVE Terms of Use
NVDCVE-2026-41991 changed 2026-10-25Public domain