kubectl cp path traversal
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 1.11.9, 1.12.7, 1.13.5
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 1 proof of concept on GitHub
Summary
The kubectl cp command allows copying files between containers and the user machine. To copy files from a container, Kubernetes creates a tar inside the container, 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 could use this to write files to any path on the user’s machine when kubectl cp is called, limited only by the system permissions of the local user. The untar function can both create and follow symbolic links. The issue is resolved in kubectl v1.11.9, v1.12.7, v1.13.5, and v1.14.0.
Timeline
- CVE published
- Record last updated
- EPSS reached 10%
FIRST estimates at least a 10% chance of exploitation in the next 30 days
Affected versions
- Kubernetes Kubernetes
From 1.11 · fixed in 1.11.9; From 1.12 · fixed in 1.12.7; From 1.13 · fixed in 1.13.5
- k8s.io/kubernetesGo
fixed in 1.11.9; From 1.12.0 · fixed in 1.12.7; From 1.13.0 · fixed in 1.13.5
- k8s.io/kubernetesGo
fixed in 1.11.9
- k8s.io/kubernetesGo
From 1.12.0 · fixed in 1.12.7
- k8s.io/kubernetesGo
From 1.13.0 · fixed in 1.13.5