Skip to content
Heist/ feed
Back to feed
Low

Predictable Temporary File in GNU gzip

Type: advisorySources: OSV

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-41991
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 17:11 UTC · Revision 1

Source evidence

Predictable Temporary File in GNU gzip

core-osv · Original source

Published 29 Jun 2026, 10:15 UTC

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

osv:CVE-2026-41991
Complete source record
{
  "id": "6931e419aa9a13e40f9e848e5dda8336b530c306cdab30fff77a24ec005cf85c",
  "url": "https://osv.dev/vulnerability/CVE-2026-41991",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Predictable Temporary File in GNU gzip",
    "summary": "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",
    "evidence": "osv:CVE-2026-41991",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "CVE-2026-41991",
      "aliases": [
        "CVE-2026-41991"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://cgit.git.savannah.gnu.org/cgit/gzip.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "4e6f8b24ab823146ab8776f0b7fe486ab34d4269"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "4e6f8b24ab823146ab8776f0b7fe486ab34d4269"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-41991.json"
          }
        }
      ],
      "modified": "2026-10-31T10:30:31.576594440Z",
      "provider": "osv",
      "references": [
        "https://cgit.git.savannah.gnu.org/cgit/gzip.git/",
        "https://www.gnu.org/software/gzip/",
        "https://cert.pl/en/posts/2026/04/CVE-2026-41991/",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41991.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-41991",
        "https://cgit.git.savannah.gnu.org/cgit/gzip.git/commit/?id=4e6f8b24ab823146ab8776f0b7fe486ab34d4269"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-377"
        ],
        "cna_assigner": "CERT-PL",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "last_affected": "1.14"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41991.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-41991",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 460023,
  "published_at": "2026-06-29T10:15:50.766+00:00"
}