CVE-2026-19444: kubectl cp path traversal on Windows allows arbitrary file writes
CVSS Rating: CVSS:3.1/AV:A/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N - Medium (6.5)
Description of vulnerability
A path traversal vulnerability exists in the kubectl cp command when it is run on Windows. kubectl cp copies files between containers and the user machine. To copy files from a container, Kubernetes runs tar inside the container to create a tar archive, copies it over the network, and kubectl unpacks it on the user's machine. If the tar binary in the container is malicious, it could run any code and output unexpected, malicious results.
An attacker who controls the contents of a container could use this to write files to arbitrary paths on the user's machine when kubectl cp is called, limited only by the system permissions of the local user. This issue only affects clients on Windows platforms.
Am I vulnerable?
You are affected if you run the kubectl client on Windows and use kubectl cp to copy files from a container whose contents you do not fully control.
To determine whether your kubectl client is an affected version, run:
kubectl version --clientAffected Versions
- kubectl v1.34.0 to v1.34.11
- kubectl v1.35.0 to v1.35.8
- kubectl v1.36.0 to v1.36.4
How do I mitigate this vulnerability?
Prior to upgrading, this vulnerability can be mitigated by only copying files from containers you trust, or by avoiding kubectl cp from untrusted containers on Windows.
Fixed Versions
- kubectl >= v1.34.12
- kubectl >= v1.35.9
- kubectl >= v1.36.5
If you find evidence that this vulnerability has been exploited, please contact [email protected]
Acknowledgements
This vulnerability was reported by Moriel Harush @MorielHarush
The issue was fixed and coordinated by: Marly Salazar @mpuckett159 Maciej Szulik @soltysh Vyom Yadav @Vyom-Yadav
Source: kubernetes/kubernetes