GitHub Advisoryadvisory · Go
GHSA-34jx-wx69-9x8v Symlink Attack in kubectl cp
MEDIUM
Official page ↗
- Aliases
- CVE-2019-1002101
- Ecosystem
- Go
- Packages
- k8s.io/kubernetes
- Severity
- Moderate
- CVSS vector
- CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
- Weaknesses
- CWE-59
- Reviewed
- 2021-05-19
Affected packages
• Go k8s.io/kubernetes: < 1.11.9 → fixed in 1.11.9
• Go k8s.io/kubernetes: >= 1.12.0, < 1.12.7 → fixed in 1.12.7
• Go k8s.io/kubernetes: >= 1.13.0, < 1.13.5 → fixed in 1.13.5
Description
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.
Related
Alias · CVE (1)
- CVE-2019-1002101 The kubectl cp command allows copying files between containers and the user machine. vulnerability
Weakness · CWE (1)
- CWE-59 Improper Link Resolution Before File Access weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2019-1002101 advisory
- https://github.com/kubernetes/kubernetes/pull/75037 web
- https://github.com/kubernetes/kubernetes/commit/47063891dd782835170f500a83f37cc98c3c1013 web
- https://access.redhat.com/errata/RHBA-2019:0619 web
- https://access.redhat.com/errata/RHBA-2019:0620 web
- https://access.redhat.com/errata/RHBA-2019:0636 web
- https://lists.fedoraproject.org/archives/list/[email protected]/message/BPV2RE5RMOGUVP5WJMXKQJZUBBLAFZPZ web
- https://lists.fedoraproject.org/archives/list/[email protected]/message/QZB7E3DOZ5WDG46XAIU6K32CXHXPXB2F web
- https://www.twistlock.com/labs-blog/disclosing-directory-traversal-vulnerability-kubernetes-copy-cve-2019-1002101 web
- http://www.openwall.com/lists/oss-security/2019/06/21/1 web
- http://www.openwall.com/lists/oss-security/2019/08/05/5 web
- http://www.securityfocus.com/bid/107652 web