GHSA-hfg8-hc9c-6c3h: Path Traversal

Published Aug 18, 2026
·
Updated

Summary The tar extraction routines in moby/go-archive (Unpack, UnpackLayer, Untar/UntarUncompressed, and the ApplyLayer helpers) do not confine filesystem operations to the destination directory. A crafted archive can create or overwrite files outside the intended destination.

Details The extractor decides where each archive entry lands using lexical string checks and then performs the filesystem operation on a path that is resolved by the OS, so a links introduced by the archive can be followed out of the destination directory.

Impact An attacker who controls the contents of archive can create or overwrite files at arbitrary paths writable by the extracting process.

Workarounds Only extract trusted archives.

Affected Software

1 affected componentFixes available
go/github.com/moby/go-archive<0.3.0
0.3.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/moby/go-archive to a version that resolves this vulnerability.

    Fixed in 0.3.0
  2. Compensating control

    Only extract trusted archives, because archive contents can create or overwrite files outside the intended destination via path traversal/symlink escape during extraction.

Event History

Aug 18, 2026
Advisory Published
via GitHub·09:17 PM
Data Sourced
via GitHub·09:17 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Which archive-extraction code paths should be included in an exposure review?

The affected extraction paths are Unpack, UnpackLayer, Untar, UntarUncompressed, and the ApplyLayer helpers in go/github.com/moby/go-archive. Teams should identify uses of any of these routines when assessing exposure.

2

What access does an attacker need, and what limits the resulting file writes?

Exploitation requires an attacker to control the archive contents. The attacker can create or overwrite paths only where the extracting process has write permission.

3

What can be done if patching is not immediately possible?

Only extract archives from trusted sources until a remediation is available. Archives supplied by untrusted users or external sources should not be processed by the affected routines.

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