Advisory

GHSA-34jx-wx69-9x8v

Also known as: CVE-2019-1002101, GO-2022-0782

Summary

Symlink Attack in kubectl cp

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2022-02-15 01:57 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

k8s.io/kubernetes

Go · All systems

Affected

  • introduced 0, fixed 1.11.9 (semver)

Fixed versions

1.11.9

Fix

k8s.io/kubernetes

Go · All systems

Affected

  • introduced 1.12.0, fixed 1.12.7 (semver)

Fixed versions

1.12.7

Fix

k8s.io/kubernetes

Go · All systems

Affected

  • introduced 1.13.0, fixed 1.13.5 (semver)

Fixed versions

1.13.5

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences