REDHAT-BUG-2494158: Medium severity GNU gzip vulnerability

Published Jun 29, 2026
·
Updated

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 Software

1 affected component
GNU gzip

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade GNU gzip (gzexe utility) to a version that resolves this vulnerability.

    Patch 4e6f8b24ab823146ab8776f0b7fe486ab34d4269

Event History

Jun 29, 2026
Data Sourced
via Red Hat·12:01 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

When is the vulnerable temporary-file fallback used?

The fallback is used when the mktemp utility is not available in the PATH of the user running gzexe.

2

What access does an attacker need to exploit this issue?

An attacker needs local access and must be able to pre-create the predictable temporary-file path as a symbolic link. The symlink target must be a file writable by the gzexe user.

3

What can be overwritten if exploitation succeeds?

The attacker can cause gzexe to overwrite an arbitrary file that is writable by the victim running gzexe, by redirecting the predictable temporary path through a symbolic link.

4

What can be done before a patch is applied?

Ensure that mktemp is available in the PATH used to run gzexe, preventing the described PID-based fallback from being selected.

5

How can the fix be identified without relying on a version number?

The issue is fixed by commit 4e6f8b24ab823146ab8776f0b7fe486ab34d4269. Check whether the deployed GNU gzip package includes that fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203