CVE-2026-19444: Kubernetes kubectl cp path traversal on Windows allows arbitrary file writes
A path traversal vulnerability was discovered in the Kubernetes kubectl client's kubectl cp command on Windows. When copying files from a container, kubectl runs tar inside the container to build a tar archive, transfers it over the network, and unpacks it on the local machine. If the tar binary in the container is malicious, it can execute arbitrary code and emit unexpected output, allowing an attacker who controls container contents to write files to arbitrary paths on the user's local machine when kubectl cp is invoked, limited only by the system permissions of the local user. This issue only affects kubectl clients running on Windows.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Only users running the kubectl client on Windows are affected. Exploitation requires them to invoke kubectl cp to copy files from a container whose contents or tar binary are controlled by an attacker.
What access does an attacker need?
The attacker needs control over the source container's contents, including the ability to provide a malicious tar binary or malicious tar output. They also need a Windows user to run kubectl cp against that container.
What is the impact on the local system?
A malicious container can cause files to be written to arbitrary paths on the Windows machine running kubectl cp. The writes are constrained by the permissions of the local user who runs kubectl.