CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-17106

CVE-2026-17106: Container-to-Host Arbitrary File Write in moby/go-archive (CopyEscape)

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 18, 2026·6 min read·138 visits

Executive Summary (TL;DR)

A TOCTOU race condition in the directory-scanning phase of 'docker cp' combined with lexical path validation errors on the client host allows a compromised container to write arbitrary files outside the extraction destination, potentially causing full host system takeover.

CVE-2026-17106 (CopyEscape) is a container-to-host arbitrary file-write vulnerability within Docker's archiving and extraction library moby/go-archive. By utilizing a Time-of-Check to Time-of-Use (TOCTOU) race condition during the file-walking stage inside a running container, a malicious container process can force the host engine to produce a compromised tar stream. During client-side extraction, the Docker CLI resolves directory entries through absolute symbolic links, resulting in arbitrary file creation or modification on the host system.

Vulnerability Overview

CVE-2026-17106, colloquially known as CopyEscape, represents a container escape vector through the archiving and extraction utilities of the Docker ecosystem. The vulnerability resides within the moby/go-archive dependency, which is heavily relied upon by components such as docker cp and Docker Sandboxes' sbx cp commands. Under typical conditions, these utilities facilitate the copying of files between the virtual container environment and the physical host system.

The underlying data transfer operates using a producer-consumer model where files are walked, packed into a tar archive stream by the Docker daemon inside the container context, and then decoded and unpacked on the host client filesystem. This architecture assumes the container filesystem remains static during the walk and serialization phases.

An attacker controlling a running container can exploit this operational model. By introducing an on-the-fly path substitution during the serialization phase, the attacker can force the host client to extract arbitrary payloads directly onto its native filesystem, inheriting the system privileges of the local user running the client CLI utility.

Root Cause Analysis

The vulnerability stems from two independent implementation flaws: a Time-of-Check to Time-of-Use (TOCTOU) race condition on the daemon-side path walk, and a client-side directory containment failure during path verification. On the daemon side, file selection for packaging is executed using directory scanning helpers like filepath.WalkDir. While this traversal is underway, the container runtime environment remains active, allowing concurrent filesystem updates by container-bound processes.

On the host client side, path verification is performed lexically before filesystem writes occur. The extraction logic computes target locations by concatenating the extraction destination with the raw file headers. If the generated path resides mathematically within the designated destination structure, the extraction logic accepts the operation.

This validation method fails because lexical checks do not resolve symbolic links on disk. An attacker can set up a subdirectory, wait for the daemon to inspect the path, and then replace that subdirectory with an absolute symbolic link pointing to a host directory. Because the lexical check passes for child entries under the parent directory path, the host client follows the newly created symbolic link during physical file extraction, resulting in out-of-boundary file creation.

Code Analysis

The original, vulnerable logic in moby/go-archive verified directory containment using pure string manipulation. The string comparison evaluated whether the target path contains the destination directory path as a prefix without verifying intermediate links on the physical filesystem:

// INSECURE: Lexical verification bypass
dstPath := filepath.Join(dest, hdr.Name)
rel, err := filepath.Rel(dest, dstPath)
if strings.HasPrefix(rel, ".."+string(os.PathSeparator)) {
    return breakoutError(fmt.Errorf("%q is outside of %q", hdr.Name, dest))
}

If the archive contains a symbolic link named escape pointing to /usr/bin, and a child element escape/runc, the lexical analysis verifies both dest/escape and dest/escape/runc as structurally internal to dest. During the physical write, however, the OS resolves the symbolic link escape on disk, allowing the payload file to overwrite the physical host binary /usr/bin/runc.

To correct this defect, the remediation replaces lexical validation with an OS-enforced directory sandboxing model using the modern os.Root API introduced in Go 1.26. The patched implementation opens the destination target first and isolates all subsequent file creation routines to this file descriptor:

// SECURE: Enforced filesystem sandboxing via os.Root
root, err := os.OpenRoot(dest)
if err != nil {
    return err
}
defer func() { _ = root.Close() }()
 
// Writes are restricted using file-descriptor-relative operations
file, err := root.OpenFile(dstPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, hdrInfo.Mode()&0o777)

By leveraging openat2 with the RESOLVE_BENEATH flag under Linux, the operating system kernel prevents file operations from traversing symbolic links pointing outside the open root folder. Any attempt to traverse an absolute symbolic link triggers a directory escape error and halts extraction.

Exploitation Methodology

An exploitation chain requires a running container under the attacker's control and active user interaction on the host. The attacker prepares the internal container environment by creating a nested file structure containing a large dummy file, a target subdirectory, and a staged absolute symbolic link. The large file acts as an artificial delay during the serialization phase.

The attacker runs an internal filesystem monitor utilizing inotify watches. When a host administrator executes docker cp to extract files, the daemon begins scanning the container filesystem and reading the large dummy file. This interaction triggers the inotify open event, signaling the monitor process to initiate the race.

The monitor process immediately invokes rename system calls to swap the target directory with the prepared absolute symbolic link pointing to a host destination like /usr/bin. The daemon packages the symbolic link alongside the nested payload files. Upon receiving this stream, the host CLI extracts the absolute link, follows it, and overwrites target files on the host.

Impact Assessment

The impact of CVE-2026-17106 is highly critical, with potential for arbitrary host code execution. If the host administrator runs the client utilities as root, an attacker can modify host binaries. For example, overwriting /usr/bin/runc grants complete command execution as root the next time a container is started or stopped on the host.

If the executing host user has limited privileges, the write capabilities are restricted to the directories owned by that user. However, this still permits high-impact actions, such as writing to local user shell profiles like ~/.bashrc or ~/.zshrc to achieve privilege escalation.

The CVSS v4.0 metrics yield a base score of 7.1. While confidentiality, integrity, and availability impacts are elevated, the requirement for active host user interaction limits spontaneous remote execution vectors.

Remediation and Mitigation

Remediation requires upgrading container client and engine environments to versions incorporating the moby/go-archive 0.3.0 patch. Users must update Docker Desktop to version 4.86.0 or higher, and Docker Engine to 29.7.0 or higher.

Temporary workarounds should be applied if immediate patching is not possible. Administrators should avoid running docker cp against containers executing unverified workloads. Restricting the execution of host-side copy commands to non-root users ensures any malicious write remains contained within normal user permissions.

Additionally, systems should run monitoring utilities like auditd to identify anomalous modifications to crucial container helper files. Configuring logging mechanisms to report file write operations on paths such as /usr/bin/runc provides immediate detection capabilities.

Fix Analysis (2)

Technical Appendix

CVSS Score
7.1/ 10
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 Systems

moby/go-archive < 0.3.0Docker Desktop < 4.86.0Docker Engine < 29.7.0Docker CLI < 29.7.0Docker Compose < 5.4.0Docker Sandboxes < 0.38.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
go-archive
moby
< 0.3.00.3.0
Docker Desktop
Docker
< 4.86.04.86.0
Docker Engine
Docker
< 29.7.029.7.0
AttributeDetail
CWE IDCWE-59
Attack VectorLocal (AV:L)
CVSS v4.0 Score7.1
Exploit StatusProof of Concept (PoC)
Vulnerability ClassImproper Link Resolution ('Link Following')
ImpactArbitrary File Write / Privilege Escalation

MITRE ATT&CK Mapping

T1574Hijack Execution Flow
Persistence
T1059Command and Scripting Interpreter
Execution
T1222File and Directory Permissions Modification
Defense Evasion
CWE-59
Improper Link Resolution Before File Access ('Link Following')

The application attempts to access a file based on a filename, but it does not properly prevent that file from being a symbolic link or hard link that points to an unintended external resource.

Known Exploits & Detection

GitHubCopyEscape Official PoC

References & Sources

  • [1]moby/go-archive GHSA Security Advisory
  • [2]CopyEscape Proof of Concept

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-11748
6.9

CVE-2026-11748: Unauthenticated LDAP Injection in Central Dogma Server Authentication

An LDAP injection vulnerability exists in the centraldogma-server-auth-shiro module of LY Corporation Central Dogma before version 0.84.0. The search logic dynamically constructs LDAP search filters by interpolating user-provided usernames without escaping RFC 4515 metacharacters. Unauthenticated remote attackers can leverage this flaw to bypass authentication, enumerate directory hierarchies, and access unauthorized resources.

Alon Barad
Alon Barad
9 views•6 min read
•1 day ago•CVE-2026-11746
9.4

CVE-2026-11746: Use of Hard-coded ZooKeeper Replication Secret 'ch4n63m3' in Central Dogma Server

CVE-2026-11746 is a critical vulnerability in Central Dogma Server prior to version 0.84.0, where an embedded ZooKeeper replication secret silently falls back to a publicly known, hard-coded default string ('ch4n63m3'). Remote attackers with access to the replication network can authenticate as legitimate cluster peers, potentially leading to unauthorized data exposure, state manipulation, or complete cluster takeover.

Amit Schendel
Amit Schendel
7 views•6 min read
•1 day ago•CVE-2026-56665
4.2

CVE-2026-56665: Logical Validation Bypass in ZITADEL External JWT Identity Provider

A logical verification flaw in ZITADEL's external JWT Identity Provider validation allows attackers to bypass session expiration checks. If an incoming JWT lacks the 'exp' claim, the system skips validation entirely, creating an indefinitely valid session. This issue has been addressed in versions 3.4.12 and 4.15.2.

Alon Barad
Alon Barad
7 views•7 min read
•1 day ago•CVE-2026-59149
6.5

CVE-2026-59149: Sibling Directory Path Traversal in Mockoon Backend Server

CVE-2026-59149 identifies a directory traversal vulnerability in `@mockoon/commons-server`, the backend mock-server library powering the Mockoon application. The flaw occurs in the path containment validation logic used during raw file response generation. An unauthenticated attacker can exploit this weakness to retrieve arbitrary files from sibling directories sharing a common prefix with the designated static base directory.

Amit Schendel
Amit Schendel
9 views•5 min read
•1 day ago•CVE-2026-59148
8.8

CVE-2026-59148: Unauthenticated Administrative API and CORS Misconfiguration in Mockoon

An in-depth analysis of CVE-2026-59148, a high-severity flaw in Mockoon where unauthenticated administrative endpoints and a wildcard Cross-Origin Resource Sharing (CORS) policy allow remote execution, state poisoning, and credential theft.

Alon Barad
Alon Barad
11 views•6 min read
•1 day ago•CVE-2026-56666
4.8

CVE-2026-56666: Account Takeover via Improper Email Verification in ZITADEL Federated Identity Handler

An improper authentication vulnerability (CWE-287) in ZITADEL's external identity provider handler before version 4.15.3 allows remote attackers to perform complete account takeover. When auto-linking by email is enabled, ZITADEL verifies that the local target account has a verified email address but fails to verify if the external provider confirmed ownership of that same email. Attackers can exploit this by registering an unverified account with a victim's email address on a permissive external provider, leading to unauthorized account binding and persistent access.

Amit Schendel
Amit Schendel
7 views•7 min read