Threat reportVulnerabilityTL-2026-2812
Docker CopyEscape (CVE-2026-17106): docker cp / sbx cp flaw lets malicious containers overwrite host files
CVE-2026-17106 ("CopyEscape") chains a TOCTOU race in the Docker daemon's container-filesystem archiving with a symlink-confinement flaw in moby/go-archive tar extraction, so a malicious running container can make `docker cp` (or `sbx cp`) write files anywhere the invoking user can write on the host. First disclosed .
Key facts
| Identifiers | TL-2026-2812, CVE-2026-17106 |
|---|---|
| Also known as | CopyEscape, GHSA-hfg8-hc9c-6c3h |
| Severity | HIGH |
| CVSS | 7.1 (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) |
| First disclosed | |
| Exploitation status | Public proof-of-concept exploit for a linked CVE |
| EPSS | CVE-2026-17106: 0.4% (35.8th percentile) |
| Affected products | Docker Docker Engine / Docker CLI; Docker Docker Desktop; Docker Docker Sandboxes (sbx cp); Moby moby/go-archive; Docker Docker Compose |
| Weaknesses (CWE) | CWE-22, CWE-59, CWE-367 |
| MITRE ATT&CK techniques | T1059.004 Command and Scripting Interpreter: Unix Shell, T1204.003 User Execution: Malicious Image, T1543.001 Create or Modify System Process: Launch Agent, T1546.004 Event Triggered Execution: Unix Shell Configuration Modification, T1554 Compromise Host Software Binary, T1574.006 Hijack Execution Flow: Dynamic Linker Hijacking, T1611 Escape to Host |
| Motivation | UNKNOWN |
| Target sectors | technology, software development, cloud, devops |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 6 cited sources |
Detection coverage
As of 2026-09-30, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-2812 across Splunk SPL, Microsoft KQL and Sigma, covering 8 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: CopyEscape - Docker CLI/Daemon Writes Into System Binary Paths or Container Runtime Binaries
Detects the docker CLI, sbx or dockerd creating or overwriting files under /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin or sensitive /etc autoload locations (ld.so.preload, profile.d, sudoers.d, cron). These processes never legitimately write there; a hit means a copy-out escaped its destination through the symlink-confinement flaw. Writes to runc, crun, containerd, containerd-shim-* or dockerd are flagged as runtime_binary, matching the Imperva PoC that replaced /usr/bin/runc for root code execution.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1611, T1554
- Data sources: sysmon:linux, defender_for_endpoint:DeviceFileEvents, linux_file_event
- Severity: critical
- Confidence: high
Splunk SPL
index=linux sourcetype="sysmon:linux" EventID=11 (Image="*/docker" OR Image="*/sbx" OR Image="*/com.docker.cli" OR Image="*/dockerd")
```file created or overwritten by a Docker process under system binary dirs or autoload locations```
| where match(TargetFilename, "^/((usr/)?(local/)?)s?bin/") OR match(TargetFilename, "^/etc/(ld[.]so[.]preload|profile[.]d/|sudoers[.]d/|cron)")
| eval hit_class=if(match(TargetFilename, "/(runc|crun|containerd|containerd-shim[^/]*|dockerd|docker-init|docker-proxy|ctr)$"), "runtime_binary", "system_path")
| stats count min(_time) as firstTime max(_time) as lastTime values(Image) as writers by host User TargetFilename hit_class
| convert ctime(firstTime) ctime(lastTime)
| sort - hit_classMicrosoft KQL
// CVE-2026-17106 CopyEscape: Docker process writes into system binary paths or runtime binaries
DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType in ('FileCreated','FileModified','FileRenamed')
| where InitiatingProcessFileName in~ ('docker','sbx','com.docker.cli','dockerd')
| where FolderPath matches regex @'^/((usr/)?(local/)?)s?bin/|^/etc/(ld[.]so[.]preload|profile[.]d/|sudoers[.]d/|cron)'
| extend HitClass = iff(FileName in~ ('runc','crun','containerd','containerd-shim-runc-v2','dockerd','docker-init','docker-proxy','ctr'), 'runtime_binary', 'system_path')
| project Timestamp, DeviceName, InitiatingProcessAccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, ActionType, FolderPath, FileName, HitClass, SHA256
| order by Timestamp descSigma
title: Docker CLI or Daemon Writes Into System Binary Paths (CopyEscape)
id: b4a2d3e5-6c7f-4081-9ba2-3d4e5f6a7b02
status: experimental
description: Detects the docker CLI, sbx or dockerd creating files under system binary directories or autoload locations such as ld.so.preload. Under CVE-2026-17106 a malicious container can pivot a docker cp extraction through a symlink and overwrite host files such as /usr/bin/runc.
references:
- https://www.imperva.com/blog/copyescape-taking-over-docker-hosts-with-docker-cp/
- https://github.com/moby/go-archive/security/advisories/GHSA-hfg8-hc9c-6c3h
author: Threadlinqs Team
date: 2026-09-30
tags:
- attack.privilege-escalation
- attack.t1611
- attack.persistence
- attack.t1554
- cve.2026-17106
logsource:
product: linux
category: file_event
detection:
selection_writer:
Image|endswith:
- '/docker'
- '/sbx'
- '/com.docker.cli'
- '/dockerd'
selection_path:
TargetFilename|startswith:
- '/bin/'
- '/sbin/'
- '/usr/bin/'
- '/usr/sbin/'
- '/usr/local/bin/'
- '/usr/local/sbin/'
- '/etc/ld.so.preload'
- '/etc/profile.d/'
- '/etc/sudoers.d/'
condition: selection_writer and selection_path
falsepositives:
- Docker installed or upgraded by a script that runs the docker binary itself rather than a package manager
- docker cp with a deliberately chosen host destination inside a system directory on a lab machine
level: criticalKnown false positives:
- Docker install scripts that place binaries using the docker process instead of a package manager
- docker cp with an intentionally chosen destination in a system directory on a lab host
Tuning notes: Very low noise by design because Docker processes do not normally write to system binary directories. If Sysmon for Linux FileCreate coverage is thin, add an auditd watch (-w /usr/bin/runc -p wa -k runc_tamper) and equivalent watches for containerd, containerd-shim-runc-v2 and crun, then search on that key. Treat any runtime_binary hit as an incident: isolate the host and verify the runc hash against the package manifest.
- CopyEscape - docker cp / sbx cp Copy-Out Launched by CI/CD or Automation Agents · unlock with TL Creds
- CopyEscape - Docker CLI Writes macOS LaunchAgent/LaunchDaemon Persistence · unlock with TL Creds
- CopyEscape - Docker CLI Overwrites Shell Startup Files or SSH Material · unlock with TL Creds
- CopyEscape - LD_PRELOAD Interposer Loaded From a Writable Path · unlock with TL Creds
- CopyEscape - Symlink Pointing at Host System Directory (Race Pivot Staging) · unlock with TL Creds
- CopyEscape - Container Runtime Binary Modified By Non-Package-Manager Process · unlock with TL Creds
- CopyEscape - Privileged docker cp / sbx cp Copy-Out From a Container · unlock with TL Creds
- CopyEscape - Container Runtime Executed via Shell/Interpreter Instead of Native Binary · unlock with TL Creds
Indicators of compromise
As of 2026-09-30, Threadlinqs Intelligence tracks 8 indicators of compromise for TL-2026-2812.
Technical analysis
Imperva's PoC replaced /usr/bin/runc for root code execution. Fixed in Docker Engine/CLI 29.7.2, Docker Desktop 4.86.0, Docker Sandboxes 0.38.0 and moby/go-archive 0.3.0.
CopyEscape (CVE-2026-17106) was discovered by Ron Masas of Imperva's Red Team and reported to Docker on 2026-04-11. It chains two weaknesses in Docker's archive pipeline.
Producer side (daemon): when `docker cp` copies out of a running container, the daemon walks the container's live filesystem with filepath.WalkDir to build a tar stream. A process inside the container can race the walk, moving a directory aside and replacing it with a symlink between the traversal decision and the metadata (Lstat) call. Imperva's PoC used an LD_PRELOAD interposer to make a watched path appear as a regular file while presenting a directory to the daemon, and placed a large file before the pivot point, monitored via filesystem notifications, to signal when the walk reached the critical spot and widen the race window. The resulting tar holds two inconsistent entries: a symlink and a child entry that describes the directory it replaced.
Consumer side (CLI): the extractor in moby/go-archive validates a path built with filepath.Join using a lexical string-prefix check, but creates the symlink from the original hdr.Linkname value from the archive. The containment check therefore approves one path while the kernel follows another, and later entries are written through the symlink outside the user-specified destination. The same class of flaw was present in the Docker Sandboxes `sbx cp` copy-out path. The GitHub advisory GHSA-hfg8-hc9c-6c3h lists the affected go-archive helpers as Unpack, UnpackLayer, Untar, UntarUncompressed and ApplyLayer, and rates the issue CVSS v4.0 7.1 (High), CWE-22 and CWE-59. TOCTOU (CWE-367) describes the daemon-side race.
Impact is an arbitrary file create/overwrite primitive on the host, scoped to the privileges of the process running `docker cp`. On Linux, if `docker cp` is run with sudo or by root-privileged CI/automation, overwriting /usr/bin/runc (the container runtime binary) gives root code execution the next time Docker invokes it; Imperva's PoC replaced runc with a shell script. On macOS, the Docker CLI extracts archives coming from the Linux daemon VM, so a container can overwrite shell startup scripts, SSH configuration, LaunchAgents (persistence), source trees and cloud credentials. Exposed workflows include CI/CD artifact retrieval, developer log collection, incident-response evidence collection from suspected-compromised containers, and AI-agent workflows using Docker Sandboxes. User interaction is required: a user or automation must run `docker cp`/`sbx cp` against an attacker-controlled running container.
Disclosure timeline per Imperva: reported 2026-04-11, acknowledged 2026-04-14/15, CVE assigned 2026-07-24, moby/go-archive 0.3.0 and Engine/CLI 29.7.0 shipped the extraction fix 2026-07-30, functional regressions were reported 2026-07-31 leading to an extension, Docker Sandboxes 0.38.0 fixed `sbx cp` on 2026-08-06, and Docker Desktop 4.86.0 (bundling Engine 29.7.2) released and the issue was disclosed 2026-08-10. Public PoCs exist. No in-the-wild exploitation is reported and the CVE is not in CISA KEV (per Wiz). Sources disagree on the severity label: GBHackers calls it critical without a score, while the GHSA and Wiz rate it CVSS v4.0 7.1 High; this record uses the advisory score. Sources also differ on the first fixed Engine/CLI version (29.7.0 for the extraction fix; 29.7.2 is the final fixed release).
MITRE ATT&CK techniques by tactic:
Execution
T1059.004 Command and Scripting Interpreter: Unix Shell; T1204.003 User Execution: Malicious Image
Persistence
T1543.001 Create or Modify System Process: Launch Agent; T1546.004 Event Triggered Execution: Unix Shell Configuration Modification; T1554 Compromise Host Software Binary
Defense Evasion
T1574.006 Hijack Execution Flow: Dynamic Linker Hijacking
Privilege Escalation
Remediation
Patches
- moby/go-archive 0.3.0 (GHSA-hfg8-hc9c-6c3h)
- Docker Engine/CLI 29.7.2
- Docker Desktop 4.86.0
- Docker Sandboxes 0.38.0
Immediate actions
- Upgrade Docker Engine/CLI to 29.7.2 or later, Docker Desktop to 4.86.0 or later, Docker Sandboxes to 0.38.0 or later
- Stop containers before copying files out (docker stop <container> && docker cp <container>:/path ./dest)
- Do not run docker cp / sbx cp against untrusted or suspected-compromised live containers
Workarounds
- Only extract trusted archives
- Stop the source container before docker cp so no live process can race the filesystem walk
Longer-term hardening
- Avoid running docker cp with sudo or from root-privileged CI/automation; use least-privilege accounts
- Collect artifacts from suspicious containers on isolated, disposable systems
- Treat archives and copy-out data from untrusted containers as hostile input
- Monitor integrity of /usr/bin/runc, shell startup files, SSH configuration and ~/Library/LaunchAgents
Affected and fixed versions
- Docker — Docker Engine / Docker CLI
Vulnerable versions: < 29.7.2 (29.6.1 and earlier confirmed by Imperva)
Fixed in: 29.7.2 - Docker — Docker Desktop
Vulnerable versions: < 4.86.0 (4.81.0 and earlier confirmed by Imperva)
Fixed in: 4.86.0 - Docker — Docker Sandboxes (sbx cp)
Vulnerable versions: < 0.38.0
Fixed in: 0.38.0 - Moby — moby/go-archive
Vulnerable versions: < 0.3.0
Fixed in: 0.3.0 - Docker — Docker Compose
Vulnerable versions: < 5.4.0
Fixed in: 5.4.0
Timeline
- Imperva Red Team (Ron Masas) reports the docker cp flaw to Docker
- Docker acknowledges the report and confirms it as a valid finding (April 14-15)
- CVE-2026-17106 assigned; coordinated release initially targeted for August 3
- moby/go-archive 0.3.0 and Docker Engine/CLI 29.7.0 ship the extraction fix
- Functional regressions reported; extension of the disclosure date to August 10 requested
- Docker Sandboxes 0.38.0 fixes the sbx cp destination-escape flaw
- Docker Desktop 4.86.0 (bundling Engine 29.7.2) released; Imperva publishes CopyEscape research with PoC
- GHSA-hfg8-hc9c-6c3h / CVE-2026-17106 published with CVSS v4.0 7.1 (High)
- GBHackers reports CopyEscape and urges upgrade to 29.7.2 / 4.86.0 / 0.38.0
Sources cited
- GHSA-hfg8-hc9c-6c3h: moby/go-archive tar extraction fails to confine writes GitHub · Advisory · 2026-08-18
- CVE-2026-17106 - Wiz Vulnerability Database Wiz · Advisory · 2026-08-18
- CopyEscape: Taking Over Docker Hosts with docker cp | Imperva imperva.com · Research · 2026-08-10
- CVE-2026-17106: moby/go-archive Symlink-Following Path Traversal in Tar Extraction securelayer7.net · Blog · 2026-08-18
- Docker CopyEscape CVE-2026-17106 Lets Malicious Containers Overwrite Host Files gbhackers.com · News · 2026-09-30
- CVE-2026-17106: Docker docker cp Container-to-Host Arbitrary File Write thecybersecguru.com · News · 2026-08-10
Other reports on CVE-2026-17106
Previous and next in vulnerability
Drafted by the Threadlinqs research pipeline from 6 sources; published ; last updated —.