CVE-2026-18508 Tar: tar: --one-top-level hardlink targets not confined to top-level directory enabling arbitrary file overwrite

Medium 4.4 Published Updated

Attackers can overwrite arbitrary files outside the extraction directory by crafting archives with hardlinks when using the --one-top-level option.

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

What is CVE-2026-18508?

CVE-2026-18508 is a medium-severity path traversal 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 flaw was found in GNU tar. When extracting an archive with the --one-top-level option, hardlink targets are not confined to the designated top-level directory and may resolve relative to the extraction working directory. A crafted archive can create hardlinks that escape the intended boundary and, when combined with a preexisting symbolic link under the working directory, may allow writing outside that boundary during a single extraction.

Weakness: CWE-59

Which versions are affected by CVE-2026-18508?

It affects 3 products.

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

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

How do I fix CVE-2026-18508?

Apply the vendor's patch.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-18508 being exploited?

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

All Redhat Enterprise Linux vulnerabilities

Sources

Also known as AZL-94599, CLSA-2026-1789128477, CLSA-2026-1789131413, DEBIAN-CVE-2026-18508, ECHO-94ec-2dbe-8b73, GHSA-4f5j-wqjr-hx49 and 5 more.

Is CVE-2026-18508 in your software?

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

Check your SBOMs for free