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

Medium 4.4 Published Updated

A local attacker can exploit a race condition in GNU tar's restore process to modify files outside the target directory, potentially leading to privilege escalation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-18477?

CVE-2026-18477 is a medium-severity vulnerability in Redhat Enterprise Linux, published on 3 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-367

Which versions are affected by CVE-2026-18477?

It affects 3 products.

Linux distribution packages (1)
tar Red Hat:hummingbird:1All versions0:1.35-9.1.hum1

Products include Gnu Tar, Redhat Enterprise Linux, Redhat Openshift Container Platform.

How do I fix CVE-2026-18477?

Apply the vendor's patch.

Is CVE-2026-18477 being exploited?

There is no known exploitation of CVE-2026-18477 in the wild and no public exploit code.

All Redhat Enterprise Linux vulnerabilities

Sources

Also known as AZL-94602, CLSA-2026-1787335320, CLSA-2026-1787337920, DEBIAN-CVE-2026-18477, ECHO-b8d2-238f-d46b, GHSA-v7fx-gjvh-347c and 9 more.

Is CVE-2026-18477 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free