Insecure Temporary File Affecting gzip package, versions <1.14-1~exp2ubuntu1.1


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.12% (2nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UBUNTU2604-GZIP-17740557
  • published7 Jul 2026
  • disclosed29 Jun 2026

Introduced: 29 Jun 2026

CVE-2026-41991  (opens in a new tab)
CWE-377  (opens in a new tab)

How to fix?

Upgrade Ubuntu:26.04 gzip to version 1.14-1~exp2ubuntu1.1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream gzip package and not the gzip package as distributed by Ubuntu. See How to fix? for Ubuntu:26.04 relevant fixed versions and status.

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

CVSS Base Scores

version 3.1