GHSA-hfg8-hc9c-6c3h — go-archive
GHSA-hfg8-hc9c-6c3h is a CWE-59 vulnerability in github.com/moby/go-archive. 1 public exploit reference exists, so weaponization risk is real. A fix is available for github.com/moby/go-archive — see the affected versions and patch details below.
moby/go-archive: Crafted tar archive can write outside the extraction directory
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for GHSA-hfg8-hc9c-6c3h.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
github.com/moby/go-archiveReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/moby/go-archive | all versions | 0.3.0go get github.com/moby/go-archive@v0.3.0 |
Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/moby/go-archive, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/moby/go-archive to 0.3.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hfg8-hc9c-6c3h is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-hfg8-hc9c-6c3h can be triaged on real exposure rather than presence alone.
Tailored to GHSA-hfg8-hc9c-6c3h. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This Important severity vulnerability in `moby/go-archive` allows for arbitrary file writes during tar extraction. An attacker providing a specially crafted tar archive can exploit symlink following to create or overwrite files outside the intended directory, potentially leading to system compromise in environments…
| Product | Fixed in | Advisory |
|---|---|---|
| Logging Subsystem for Red Hat OpenShift 6.6 | openshift-logging/cluster-logging-rhel9-operator:1788439505 | RHSA-2026:66521 |
| Multicluster Global Hub 1.8.2 | multicluster-globalhub/multicluster-globalhub-grafana-rhel9:1788441983 | RHSA-2026:68515 |
| Red Hat Edge Manager 1.2 | rhem/flightctl-alert-exporter-rhel10:1789485358 | RHSA-2026:68006 |
| Red Hat Edge Manager 1.2 | rhem/flightctl-alert-exporter-rhel9:1789485374 | RHSA-2026:68254 |
| Red Hat Hardened Images | podman-main-6.0.2-2.2.hum1 | RHSA-2026:52807 |
Frequently Asked Questions
Is GHSA-hfg8-hc9c-6c3h in your dependencies?
O3 Security finds GHSA-hfg8-hc9c-6c3h across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.