Skip to main content

GNU gzip EUVDEUVD-2026-40068

| CVE-2026-41991 LOW
Insecure Temporary File (CWE-377)
2026-06-29 cvd@cert.pl GHSA-67v8-88jf-4x6q
2.0
CVSS 4.0 · Vendor: cert
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify system lacking mktemp in user PATH
  2. Delivery
    Predict victim gzexe process PID
  3. Exploit
    Pre-create symlink at predicted temp path
  4. Execution
    Victim invokes gzexe
  5. Persist
    gzexe follows symlink without existence check
  6. Impact
    Target file overwritten with temp data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Secure temp file creation
Exploitation Conditions

Two specific, non-default preconditions must both be satisfied: (1) the mktemp utility must be absent from the executing user's PATH - this is the trigger for the vulnerable PID-based fallback and does not occur on standard installations of Debian, Red Hat, Ubuntu, or other major Linux distributions where mktemp ships as part of GNU coreutils; (2) the attacker must win the TOCTOU race by successfully pre-placing a symlink at the predicted path before gzexe creates its temporary file - the CVSS 4.0 AT:P metric explicitly reflects this precondition. Additionally, the victim (UI:P) must actively invoke gzexe during the attack window. Exploitation is strictly local (AV:L); no remote vector exists. The maximum impact is overwriting files writable by the victim process, bounded by the victim's own filesystem permissions; no code execution or privilege escalation path is described.

Impact

The CVSS 4.0 vector (AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N) scores 2.0, accurately capturing the low real-world risk. AV:L confines exploitation to local system access; AC:H reflects the race condition timing requirement; AT:P explicitly encodes the non-default precondition that mktemp must be absent from PATH; and VI:L caps the worst-case outcome at file overwrite with no code execution, privilege escalation, or confidentiality breach. No EPSS score was provided in the source intelligence, so exploitation probability cannot be quantified independently. No KEV listing and no public POC exist, indicating no observed or confirmed in-the-wild exploitation. The 'Information Disclosure' tag assigned by the reporter (cvd@cert.pl) conflicts with the described impact, which is purely an integrity violation - this inconsistency is unresolved and may represent a tagging error. Overall, this is a genuine but low-priority vulnerability: the triggering condition (missing mktemp) is non-default on all major modern Linux distributions, the race window is narrow, and the maximum impact is limited file corruption rather than full system compromise.

Exploit ScenarioDerived

A local attacker sharing a system with the victim monitors or predicts the PID that will be assigned to the victim's next gzexe invocation, then pre-creates a symlink at the predicted temporary file path - for example, pointing to the victim's crontab or a user-writable configuration file. When the victim runs gzexe on a system where mktemp is absent from PATH, gzexe resolves the symlink and overwrites the attacker-chosen target file with temporary data, corrupting it. No public proof-of-concept code has been identified at time of analysis.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 29, 2026

Arbitrary file overwrite in GNU gzip's gzexe utility allows a local attacker to corrupt victim-accessible files via a symlink attack exploiting predictable temporary filename construction. When mktemp is absent from the user's PATH, gzexe falls back to PID-based temp file naming without exclusive creation or existence checks, enabling a TOCTOU race where a pre-planted symlink redirects the write to an attacker-chosen target. No public exploit or CISA KEV listing exists at time of analysis; impact is limited to low-integrity file overwrite with a CVSS 4.0 score of 2.0.

RemediationAI

The upstream fix is available as commit 4e6f8b24ab823146ab8776f0b7fe486ab34d4269 in the GNU gzip repository (https://cgit.git.savannah.gnu.org/cgit/gzip.git/commit/?id=4e6f8b24ab823146ab8776f0b7fe486ab34d4269); upstream fix available via commit but a released patched version is not independently confirmed at time of analysis - monitor https://www.gnu.org/software/gzip/ and downstream distribution advisories for a tagged release. The most effective immediate compensating control is to ensure mktemp (part of GNU coreutils) is present in the PATH of any user who may invoke gzexe - this eliminates the vulnerable fallback entirely without side effects on other functionality. If gzexe is not operationally required, removing or restricting execute permissions on the gzexe binary is a low-risk mitigation. Environments where shared local access is a concern should apply filesystem-level controls limiting writable directories accessible to untrusted local users while awaiting a patched package from their distribution vendor.

Affected VersionsENISA

gzip 0 ≤1.14

Affected Packages

euvd gzip no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

GNU gzip's gzexe utility is a shell script that compresses executable files and prepends a self-extracting stub. CWE-377 (Insecure Temporary File) describes the root cause: gzexe's fallback path, triggered when mktemp is absent from PATH, constructs temporary filenames from the process ID (PID). PID namespaces on Linux are typically bounded at 32768 or fewer values, making the filename predictable. The absence of O_EXCL-style exclusive file creation and pre-existence checks introduces a classic TOCTOU window between filename selection and file creation. The upstream fix is recorded in cgit commit 4e6f8b24ab823146ab8776f0b7fe486ab34d4269 in the GNU gzip Savannah repository. No CPE string was supplied in the source intelligence; the affected component is the gzexe script bundled with GNU gzip as documented at https://www.gnu.org/software/gzip/.

Know when Gzip gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (cert) PRIMARY 2.0 LOW
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 2.5 LOW

Local TOCTOU race with non-default mktemp-absent trigger sets AC:H; no code execution limits impact to I:L only.

3.1 AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N
4.0 AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (cert).

CVSS VectorVendor: cert

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
Ubiquitous
GNU gzip ships by default on all major Linux distributions
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy