CVEfocus › CVE database › CVE-2026-18477

CVE-2026-18477Tar: tar: toctou in incremental dumpdir 'x' rename handling allows restore path escape

CVSS 4.4 MediumEPSS 0.1% (higher than 0% of CVEs)Published 2026-08-03Updated 2026-11-05Assigner: redhat

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.

CWE-367

What to do

Fixed builds are available from AlmaLinux, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

9Fixed
11Fix pending
2Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10tarFix pendingUBUNTU-CVE-2026-18477
Ubuntu 26.04tarFix pendingUBUNTU-CVE-2026-18477
Ubuntu 24.04tarFix pendingUBUNTU-CVE-2026-18477
Ubuntu 22.04tarFix pendingUBUNTU-CVE-2026-18477
Ubuntu 20.04tarFix pendingUBUNTU-CVE-2026-18477
Ubuntu 18.04tarFix pendingUBUNTU-CVE-2026-18477
Ubuntu 16.04tarFix pendingUBUNTU-CVE-2026-18477
Ubuntu 14.04tarFix pendingUBUNTU-CVE-2026-18477
Debian 14tarFix pendingDEBIAN-CVE-2026-18477
Debian 13tarFix pendingDEBIAN-CVE-2026-18477
Debian 12tarFix pendingDEBIAN-CVE-2026-18477
Red Hat Enterprise Linux 10tarFixed2:1.35-13.el10_2RHSA-2026:61586
Red Hat Enterprise Linux 9tarFixed2:1.34-13.el9_8RHSA-2026:61581
Red Hat Enterprise Linux 8tarFixed2:1.30-13.el8_10RHSA-2026:70390
Red Hat Enterprise Linux 7tarWill not fix
Out of support scope
Red Hat Enterprise Linux 6tarWill not fix
Out of support scope
AlmaLinux 10tarFixed2:1.35-13.el10_2ALSA-2026:61586
AlmaLinux 9tarFixed2:1.34-13.el9_8ALSA-2026:61581
AlmaLinux 8tarFixed2:1.30-13.el8_10ALSA-2026:70390
Rocky Linux 10tarFixed2:1.35-13.el10_2RLSA-2026:61586
Rocky Linux 9tarFixed2:1.34-13.el9_8RLSA-2026:61581
Rocky Linux 8tarFixed2:1.30-13.el8_10RLSA-2026:70390

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

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.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.