REDHAT-BUG-2509843: Medium severity GNU tar vulnerability
A flaw was found in GNU tar. The --one-top-level option is intended to confine extraction under a designated directory, but hardlink targets from the archive are not confined the same way and are resolved relative to the extraction working directory (or the directory given with -C). A crafted archive can create hardlinks inside the --one-top-level directory that point to files outside it. If a suitable symbolic link already exists under the extraction working directory, hardlinking to that symlink can bypass tar's usual symlink-based path protections and allow writing outside the intended top-level directory during a single extraction. Users who rely on --one-top-level as a security boundary when extracting untrusted archives may be affected.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Do not rely on GNU tar's --one-top-level as a security boundary for extracting untrusted archives, since hardlink targets from the archive can bypass tar's usual symlink-based path protections and allow writing outside the intended top-level directory.
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2509843?
The severity of REDHAT-BUG-2509843 is classified as medium with a risk score of 4.
What is the description of REDHAT-BUG-2509843?
REDHAT-BUG-2509843 describes a flaw in GNU tar where the --one-top-level option does not appropriately confine hardlink targets during extraction.
How do I fix REDHAT-BUG-2509843?
To fix REDHAT-BUG-2509843, ensure that you do not use the --one-top-level option when dealing with archives containing hardlinks.
What software is affected by REDHAT-BUG-2509843?
REDHAT-BUG-2509843 affects GNU tar.
When was REDHAT-BUG-2509843 published?
REDHAT-BUG-2509843 was published on July 31, 2026.