Vulnerabilities in pkg:golang/github.com/moby/go-archive
PACKAGECVE-2026-17106 is a HIGH crafted tar archive can write vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting moby/go-archive libraries in the Go ecosystem. The issue involves crafted tar archive can write outside the extraction directory. Remediation is available by upgrading affected packages to version 0.3.0.
pkg:golang/github.com/moby/go-archive
Vulnerability advisories affecting package pkg:golang/github.com/moby/go-archive. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-hfg8-hc9c-6c3h | CVE-2026-17106 | HIGH | moby/go-archive: Crafted tar archive can write outside the extraction directory |
CVE-2026-17106 at a Glance
How to Fix CVE-2026-17106
To remediate this vulnerability, upgrade all affected moby/go-archive dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/moby/go-archive to 0.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/moby/go-archive
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-17106, inspect your project dependencies for moby/go-archive:
inspect dependencies for github.com/moby/go-archive
Analyze the terminal output to locate any version of moby/go-archive in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In moby/go-archive, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-17106 Affected moby/go-archive Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/moby/go-archive
|
Go |
< 0.3.0
|
0.3.0
|
References
Frequently Asked Questions
What is CVE-2026-17106?
Which moby/go-archive versions are affected?
What version fixes CVE-2026-17106?
Is github.com/moby/go-archive affected?
What CWE is associated with CVE-2026-17106?
How can I check Go dependencies for CVE-2026-17106?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hfg8-hc9c-6c3h",
"modified" : "2026-08-18T21:17:29Z",
"published" : "2026-08-18T21:17:29Z",
"aliases" : [ "CVE-2026-17106" ],
"summary" : "moby/go-archive: Crafted tar archive can write outside the extraction directory",
"details" : "### Summary\nThe 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. \n\n### Details\nThe 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.\n\n### Impact\nAn attacker who controls the contents of archive can create or overwrite files at arbitrary paths writable by the extracting process.\n\n### Workarounds\nOnly extract trusted archives.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/moby/go-archive"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/moby/go-archive/security/advisories/GHSA-hfg8-hc9c-6c3h"
}, {
"type" : "WEB",
"url" : "https://github.com/moby/moby/issues/52948"
}, {
"type" : "WEB",
"url" : "https://docs.docker.com/desktop/release-notes/#4860"
}, {
"type" : "WEB",
"url" : "https://github.com/bikini/exploitarium/tree/main/docker-cp-copyout-destination-escape"
}, {
"type" : "WEB",
"url" : "https://github.com/docker/cli/releases/tag/v29.7.0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/moby/go-archive"
}, {
"type" : "WEB",
"url" : "https://github.com/moby/moby/releases/tag/docker-v29.7.0"
}, {
"type" : "WEB",
"url" : "https://www.imperva.com/blog/copyescape-taking-over-docker-hosts-with-docker-cp"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-59" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-08-18T21:17:29Z",
"nvd_published_at" : null
}
}