CVE-2026-17106: moby/go-archive Crafted Tar Archive Can Write Vulnerability

HIGH
Advisory Identifier: GHSA-hfg8-hc9c-6c3h
CWE-59 CWE-22
Published
Advisory Summary

CVE-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.

CVE-2026-17106 at a Glance

CVE Identifier CVE-2026-17106
GHSA Identifier GHSA-hfg8-hc9c-6c3h
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product moby/go-archive
Package Ecosystem Go
Published Date
Last Updated

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.

github.com/moby/go-archive fixed: 0.3.0
Upgrade github.com/moby/go-archive to 0.3.0
Verify Direct and Transitive Dependencies

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

### 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.

CVE-2026-17106 Affected moby/go-archive Versions

1 component(s)
Fixed Versions:
0.3.0
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?
CVE-2026-17106 is a security vulnerability in moby/go-archive involving Crafted tar archive can write outside the extraction directory under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which moby/go-archive versions are affected?
Affected versions include releases prior to 0.3.0 across affected packages: github.com/moby/go-archive.
What version fixes CVE-2026-17106?
Upgrading to 0.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/moby/go-archive affected?
Yes, github.com/moby/go-archive is affected in releases prior to 0.3.0. Upgrade your dependency to 0.3.0 or later.
What CWE is associated with CVE-2026-17106?
CVE-2026-17106 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (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.).
How can I check Go dependencies for CVE-2026-17106?
Run the dependency tree command: 'inspect dependencies for github.com/moby/go-archive'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}