CVE-2026-18477

Tar: tar: toctou in incremental dumpdir 'x' rename handling allows restore path escape

Published Aug 3, 2026 CVSS 3.1 · 4.4 Medium EPSS < 1% KEV · Not listed
Description
A TOCTOU (Time-of-Check Time-of-Use) vulnerability in GNU tar's incremental dumpdir 'X' rename handling allows a local attacker with write access to a directory being backed up to influence the restore process if the attacker has access to the system where the restore is being performed. During restoration, files or directories may be created, renamed or overwritten outside the intended extraction directory. This could lead to unauthorized file modification or, in some cases, privilege escalation. Exploitation does not require the attacker to modify or craft the archive, and standard backup and restore workflows—including extracting into a newly created directory without using the -P option do not mitigate the issue.

Analysis

AI-generated

Technical impact

This vulnerability is a time‑of‑check to time‑of‑use race in GNU tar’s handling of incremental dumpdir 'X' rename operations. The flaw allows a local attacker who can write to a directory included in a backup to influence the restore process. Because the rename logic does not properly validate target paths, the attacker can cause files or folders to be created, renamed, or overwritten outside the intended extraction directory. This can result in unauthorized modification of system files and, in certain configurations, provide a foothold for privilege escalation. The weakness is identified as CWE‑367.

Affected Systems

Affected products include Red Hat Enterprise Linux versions 6, 7, 8, 9, 10, Red Hat Hardened Images, and Red Hat OpenShift Container Platform 4. The CPE strings list also reference the Hummingbird component. No specific version numbers are supplied beyond the product names.

Risk and Exploitability

The CVSS score of 4.4 indicates a moderate severity. EPSS data is not available and the vulnerability is not listed in CISA’s KEV catalog. Exploitation requires the attacker to have local write access to a backed‑up directory and to be able to perform a restore on the target system, making the attack vector local. Because the flaw is not mitigated by common backup procedures such as creating a fresh extraction directory or omitting the -P option, the primary defense is process‑level controls rather than software patches.

Remediation

Vendor Workaround

Do not perform incremental restores (-G/-g) from untrusted archives. Avoid restoring incremental backups on systems where untrusted users have shell access,​ perform restoration only on systems inaccessible to users.


OpenCVE Recommended Actions

  • Ensure that incremental backups are only restored on systems where untrusted users do not have shell access.
  • Avoid restoring incremental backups that contain user‑controlled content on shared or multi‑tenant systems; perform restores only on isolated or trusted hosts.
  • Upgrade GNU tar to a patched version that resolves the TOCTOU race, if available from the vendor; otherwise, switch to an alternative backup utility that does not expose this vulnerability.

Generated by OpenCVE AI on August 4, 2026 at 10:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Redhat rhel Els
CPEs cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:rhel_els:6
cpe:/o:redhat:rhel_els:7
Vendors & Products Redhat rhel Els
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:5
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:8 cpe:/o:redhat:enterprise_linux:8::baseos
References
Type Values Removed Values Added
First Time appeared Redhat rhui
CPEs cpe:/a:redhat:rhui:5::el9
Vendors & Products Redhat rhui
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10 cpe:/o:redhat:enterprise_linux:10.2
References
Type Values Removed Values Added
First Time appeared Redhat discovery
CPEs cpe:/a:redhat:discovery:2::el9
Vendors & Products Redhat discovery
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:9 cpe:/o:redhat:enterprise_linux:9::baseos
References
Type Values Removed Values Added
CPEs cpe:2.3:a:gnu:tar:1.35:*:*:*:*:*:*:*
cpe:2.3:a:redhat:openshift_container_platform:4.0:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Gnu
Gnu tar
Redhat hardened Images
Redhat openshift Container Platform
Vendors & Products Gnu
Gnu tar
Redhat hardened Images
Redhat openshift Container Platform
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description A TOCTOU (Time-of-Check Time-of-Use) vulnerability in GNU tar's incremental dumpdir 'X' rename handling allows a local attacker with write access to a directory being backed up to influence the restore process if the attacker has access to the system where the restore is being performed. During restoration, files or directories may be created, renamed or overwritten outside the intended extraction directory. This could lead to unauthorized file modification or, in some cases, privilege escalation. Exploitation does not require the attacker to modify or craft the archive, and standard backup and restore workflows—including extracting into a newly created directory without using the -P option do not mitigate the issue.
Title Tar: tar: toctou in incremental dumpdir 'x' rename handling allows restore path escape
First Time appeared Redhat
Redhat enterprise Linux
Redhat hummingbird
Redhat openshift
Weaknesses CWE-367
CPEs cpe:/a:redhat:hummingbird:1
cpe:/a:redhat:openshift:4
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Redhat hummingbird
Redhat openshift
References
Metrics cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N'}

Weaknesses
  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Nov 5, 2026, 7:25 PM
Reserved
Jul 31, 2026, 10:48 AM
Status
Modified
Published
Aug 3, 2026, 5:16 PM
Modified
Nov 5, 2026, 8:17 PM
Severity
Moderate
Public date
Jul 31, 2026, 12:00 AM