GHSA-hfg8-hc9c-6c3h

Suggest an improvement
Source
https://github.com/advisories/GHSA-hfg8-hc9c-6c3h
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-hfg8-hc9c-6c3h/GHSA-hfg8-hc9c-6c3h.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-hfg8-hc9c-6c3h
Aliases
Downstream
CGA (96)
MINI (36)
Published
2026-08-18T21:17:29Z
Modified
2026-08-25T20:26:09Z
Severity
  • 7.1 (High) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N CVSS Calculator
Summary
moby/go-archive: Crafted tar archive can write outside the extraction directory
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-22",
        "CWE-59"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-08-18T21:17:29Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

Go / github.com/moby/go-archive

Package

Name
github.com/moby/go-archive
View open source insights on deps.dev
Purl
pkg:golang/github.com/moby/go-archive

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.3.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-hfg8-hc9c-6c3h/GHSA-hfg8-hc9c-6c3h.json"