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

Summary

CVECVE-2026-18477
StatePUBLISHED
Assignerredhat
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-08-03 17:16:33 UTC
Updated2026-08-21 13:16:55 UTC
DescriptionA 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.

Risk And Classification

Primary CVSS: v3.1 4.4 MEDIUM from [email protected]

CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N

EPSS: 0.001040000 probability, percentile 0.011860000 (date 2026-08-21)

Problem Types: CWE-367 | CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary4.4MEDIUMCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N
3.1CNACVSS4.4MEDIUMCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Gnu Tar 1.35 All All All
Operating System Redhat Enterprise Linux 10.0 All All All
Operating System Redhat Enterprise Linux 8.0 All All All
Operating System Redhat Enterprise Linux 9.0 All All All
Application Redhat Openshift Container Platform 4.0 All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Red Hat Red Hat Hardened Images unaffected 1.35-9.1.hum1 * rpm Not specified
CNA Red Hat Red Hat Enterprise Linux 10 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 6 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 7 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 8 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 9 Not specified Not specified
CNA Red Hat Red Hat Hardened Images Not specified Not specified
CNA Red Hat Red Hat Hardened Images Not specified Not specified
CNA Red Hat Red Hat Hardened Images Not specified Not specified
CNA Red Hat Red Hat Hardened Images Not specified Not specified
CNA Red Hat Red Hat Hardened Images Not specified Not specified
CNA Red Hat Red Hat Hardened Images Not specified Not specified
CNA Red Hat Red Hat Hardened Images Not specified Not specified
CNA Red Hat Red Hat Hardened Images Not specified Not specified
CNA Red Hat Red Hat Hardened Images Not specified Not specified
CNA Red Hat Red Hat Hardened Images Not specified Not specified
CNA Red Hat Red Hat OpenShift Container Platform 4 Not specified Not specified

References

ReferenceSourceLinkTags
access.redhat.com/errata/RHSA-2026:49361 [email protected] access.redhat.com Vendor Advisory
access.redhat.com/security/cve/CVE-2026-18477 [email protected] access.redhat.com Vendor Advisory
bugzilla.redhat.com/show_bug.cgi [email protected] bugzilla.redhat.com Issue Tracking, Vendor Advisory
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Red Hat would like to thank Marcin Wyczechowski (AFINE Team) and Michał Majchrowicz (AFINE Team) for reporting this issue. (en)

Additional Advisory Data

SourceTimeEvent
CNA2026-07-31T10:48:52.898ZReported to Red Hat.
CNA2026-07-31T00:00:00.000ZMade public.

Workarounds

CNA: 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.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report