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·1 visit

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

•26 minutes ago•GHSA-7GWW-X7FH-JF9J
8.1

GHSA-7GWW-X7FH-JF9J: SSRF-Driven Stored Cross-Site Scripting in LibreNMS Oxidized Integration

An injection vulnerability in LibreNMS's Oxidized integration component allows administrative or network-positioned attackers to achieve stored cross-site scripting (XSS). By setting a malicious oxidized.url endpoint, the server makes outbound queries and processes returned JSON fields containing malicious HTML or JavaScript. These payloads are outputted directly in the web UI without appropriate output encoding.

Amit Schendel
Amit Schendel
0 views•6 min read
•about 2 hours ago•CVE-2026-73974
5.5

CVE-2026-73974: Local Path Traversal and Privilege Escalation in Linuxfabrik Monitoring Plugins

CVE-2026-73974 is a local path traversal vulnerability in linuxfabrik-lib and Linuxfabrik Monitoring Plugins. Under standard monitoring configurations running with elevated privileges via sudo, this flaw can be exploited by an unprivileged local user to read arbitrary root-only files, resulting in local privilege escalation.

Alon Barad
Alon Barad
3 views•5 min read
•about 3 hours ago•CVE-2026-71417
7.3

CVE-2026-71417: Authorization Bypass Leading to Unauthorized TLS Certificate Revocation in Netflix Lemur

CVE-2026-71417 is an authorization bypass vulnerability (CWE-639) in Netflix Lemur, an open-source TLS certificate management framework. In versions prior to 1.9.3, a low-privileged authenticated user can bypass role and certificate-level permission boundaries to revoke arbitrary managed TLS certificates at the upstream Certificate Authority (CA). This vulnerability stems from an architectural issue where Lemur evaluates authorization against internal database row ownership rather than the unique, cryptographic identity of the certificate. An attacker can exploit this flaw by uploading a duplicate record of a target certificate and requesting its revocation, triggering a downstream CA-side revocation and a subsequent denial-of-service (DoS) condition for services relying on the target certificate.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 4 hours ago•CVE-2026-68927
3.0

CVE-2026-68927: Server-Side Request Forgery Port Restriction Bypass in Mobile Security Framework (MobSF)

A Server-Side Request Forgery (SSRF) vulnerability exists in Mobile Security Framework (MobSF) prior to version 4.5.1. The flaw occurs in the Android App Link validation process, where a split-validation vulnerability allows an authenticated attacker to perform port restriction bypasses and potential DNS rebinding attacks against internal infrastructure.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 6 hours ago•CVE-2026-68923
6.5

CVE-2026-68923: Cross-Site Request Forgery (CSRF) in Mobile Security Framework (MobSF)

CVE-2026-68923 describes a critical security regression in the Mobile Security Framework (MobSF) where vital security middleware, including Cross-Site Request Forgery (CSRF) validation, clickjacking protection, and standard HTTP security controls, was deactivated. The vulnerability arose from a partial migration of Django's middleware settings, which silently omitted security-critical components while preserving legacy definitions. Authenticated sessions on vulnerable instances were left exposed to arbitrary administrative state modifications initiated via cross-site vectors.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 6 hours ago•CVE-2026-68922
5.5

CVE-2026-68922: Arbitrary File Read via Path Traversal in MobSF ZIP/APK Icon Extraction

CVE-2026-68922 is a path traversal vulnerability in Mobile Security Framework (MobSF) prior to version 4.5.1. The vulnerability exists within the Android icon extraction process when analyzing uploaded ZIP or APK archives, allowing an authenticated attacker to read arbitrary files from the server.

Amit Schendel
Amit Schendel
5 views•6 min read