CVE-2026-18477Tar: tar: toctou in incremental dumpdir 'x' rename handling allows restore path escape
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | tar | Fix pending | UBUNTU-CVE-2026-18477 | |
| Ubuntu 26.04 | tar | Fix pending | UBUNTU-CVE-2026-18477 | |
| Ubuntu 24.04 | tar | Fix pending | UBUNTU-CVE-2026-18477 | |
| Ubuntu 22.04 | tar | Fix pending | UBUNTU-CVE-2026-18477 | |
| Ubuntu 20.04 | tar | Fix pending | UBUNTU-CVE-2026-18477 | |
| Ubuntu 18.04 | tar | Fix pending | UBUNTU-CVE-2026-18477 | |
| Ubuntu 16.04 | tar | Fix pending | UBUNTU-CVE-2026-18477 | |
| Ubuntu 14.04 | tar | Fix pending | UBUNTU-CVE-2026-18477 | |
| Debian 14 | tar | Fix pending | DEBIAN-CVE-2026-18477 | |
| Debian 13 | tar | Fix pending | DEBIAN-CVE-2026-18477 | |
| Debian 12 | tar | Fix pending | DEBIAN-CVE-2026-18477 | |
| Red Hat Enterprise Linux 10 | tar | Fixed | 2:1.35-13.el10_2 | RHSA-2026:61586 |
| Red Hat Enterprise Linux 9 | tar | Fixed | 2:1.34-13.el9_8 | RHSA-2026:61581 |
| Red Hat Enterprise Linux 8 | tar | Fixed | 2:1.30-13.el8_10 | RHSA-2026:70390 |
| Red Hat Enterprise Linux 7 | tar | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | tar | Will not fix Out of support scope | ||
| AlmaLinux 10 | tar | Fixed | 2:1.35-13.el10_2 | ALSA-2026:61586 |
| AlmaLinux 9 | tar | Fixed | 2:1.34-13.el9_8 | ALSA-2026:61581 |
| AlmaLinux 8 | tar | Fixed | 2:1.30-13.el8_10 | ALSA-2026:70390 |
| Rocky Linux 10 | tar | Fixed | 2:1.35-13.el10_2 | RLSA-2026:61586 |
| Rocky Linux 9 | tar | Fixed | 2:1.34-13.el9_8 | RLSA-2026:61581 |
| Rocky Linux 8 | tar | Fixed | 2:1.30-13.el8_10 | RLSA-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.
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Discovery 2
- Red Hat Hardened Images
- Red Hat Update Infrastructure 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat OpenShift Container Platform 4
- Red Hat OpenShift Container Platform 5
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:
- https://access.redhat.com/errata/RHSA-2026:49361 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2026:61581 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2026:61586 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2026:61783 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2026:66018 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2026:70390 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2026:49361
- https://access.redhat.com/errata/RHSA-2026:61581
- https://access.redhat.com/errata/RHSA-2026:61586
- https://access.redhat.com/errata/RHSA-2026:61783
- https://access.redhat.com/errata/RHSA-2026:66018
- https://access.redhat.com/errata/RHSA-2026:70390
- https://access.redhat.com/security/cve/CVE-2026-18477
- https://bugzilla.redhat.com/show_bug.cgi?id=2509735
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.