REDHAT-BUG-2513087: Path Traversal

Published Aug 10, 2026
·
Updated

GNU cpio contains a Path Traversal vulnerability in its tar archive extraction functionality. When extracting a tar archive in copy-in mode with the --no-absolute-filenames option, the extracted file name is normalized but the tar hard-link target is passed to the linktoname function without equivalent sanitization before calling link function. A tar archive provided by an attacker, containing a hard-link entry whose linkname is set to an absolute path outside the extraction directory, can cause cpio to create a hard link to an existing file outside the intended extraction directory, breaking the expected guarantee of --no-absolute-filenames and allowing archive-controlled linkage to external files.

This issue has been fixed in commit e2b9cbdd3354d2b1569b7390d1bc15c1930559ad

Affected Software

1 affected component
GNU GNU cpio

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch e2b9cbdd3354d2b1569b7390d1bc15c1930559ad

Event History

Aug 10, 2026
Data Sourced
via Red Hat·10:32 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Systems that use GNU cpio to extract attacker-controlled tar archives in copy-in mode with the --no-absolute-filenames option are exposed. The issue specifically involves hard-link entries whose link targets reference absolute paths outside the extraction directory.

2

What must an attacker provide to exploit it?

An attacker needs to supply a tar archive containing a hard-link entry with an absolute-path linkname targeting an existing file outside the intended extraction directory. During extraction, cpio can create a hard link to that external file.

3

Is the --no-absolute-filenames option sufficient protection?

No. Although extracted file names are normalized with this option, the hard-link target was not equivalently sanitized before the link operation, so an absolute hard-link target could bypass the expected restriction.

4

How can I tell whether an archive may have triggered the issue?

Review tar archives processed by GNU cpio for hard-link entries with absolute link targets, and inspect extracted output for hard links that reference files outside the intended extraction directory. The provided data does not identify affected GNU cpio versions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203