kubectl cp path traversal (Kubernetes Kubernetes)
At a glance
- Source
- NVD
- EPSS
- EPSS 12.80 % · percentile 96 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- dwf
- NVD status
- Modified
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.
Weaknesses (CWE)
- CWE-59 — Improper Link Resolution Before File Access
References
- https://github.com/kubernetes/kubernetes/pull/75037
- http://www.securityfocus.com/bid/107652
- https://access.redhat.com/errata/RHBA-2019:0620
- https://access.redhat.com/errata/RHBA-2019:0619
- https://access.redhat.com/errata/RHBA-2019:0636
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BPV2RE5RMOGUVP5WJMXKQJZUBBLAFZPZ/
- http://www.openwall.com/lists/oss-security/2019/06/21/1
- http://www.openwall.com/lists/oss-security/2019/08/05/5
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QZB7E3DOZ5WDG46XAIU6K32CXHXPXB2F/
- https://www.twistlock.com/labs-blog/disclosing-directory-traversal-vulnerability-kubernetes-copy-cve-2019-1002101/
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.0 | MEDIUM 6.4 | CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H | dwf |
| CVSS 3.0 | MEDIUM 6.4 | CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H | NVD · josh@bress.net (Secondary) |
| CVSS 3.0 | MEDIUM 5.5 | CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N | NVD · nvd@nist.gov (Primary) |
| CVSS 2.0 | MEDIUM 5.8 | AV:N/AC:M/Au:N/C:N/I:P/A:P | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-34jx-wx69-9x8v — Symlink Attack in kubectl cp
- GO-2022-0782 — Symlink Attack in kubectl cp in k8s.io/kubernetes
European references
- ENISA EUVD · EUVD-2022-0775
- GCVE · GCVE-0-2019-1002101
CERT-FR advisories
- CERTFR-2022-AVI-591 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:kubernetes:kubernetes:*:*:*:*:*:*:*:*≥ 1.11.0 < 1.11.9cpe:2.3:a:kubernetes:kubernetes:*:*:*:*:*:*:*:*≥ 1.12.0 < 1.12.7cpe:2.3:a:kubernetes:kubernetes:*:*:*:*:*:*:*:*≥ 1.13.0 < 1.13.5cpe:2.3:a:kubernetes:kubernetes:1.14.0:*:*:*:*:*:*:*cpe:2.3:a:redhat:openshift_container_platform:3.9:*:*:*:*:*:*:*cpe:2.3:a:redhat:openshift_container_platform:3.10:*:*:*:*:*:*:*cpe:2.3:a:redhat:openshift_container_platform:3.11:*:*:*:*:*:*:*
Affected products
| Product | Versions |
|---|---|
| Kubernetes · Kubernetes | affected 1.1-1.10 ; affected 1.11 < 1.11.9 ; affected 1.12 < 1.12.7 ; affected 1.13 < 1.13.5 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |