k8s.io/kubectl is vulnerable to Path Traversal
65
Medium Risk
kubectl cp copies files out of a container by running tar inside the container and unpacking the resulting archive on the local machine. On Windows clients, the isRelative path check normalizes forward slashes but not backslashes, so a crafted tar stream from a container with untrusted contents can include a path that the check accepts as relative even though it escapes the destination directory, which lets the archive create or overwrite files at arbitrary paths on the local Windows machine, limited only by the local user's filesystem permissions. The fix normalizes backslashes to forward slashes before computing and validating the relative path.
You are affected if you are using a version that falls within the vulnerable range and you run kubectl cp to copy files out of a container on a Windows client.
k8s.io/kubectl is vulnerable to Path Traversal in versions 0.34.0 - 0.34.11, 0.35.0 - 0.35.8 and 0.36.0 - 0.36.4.
Upgrade the k8s.io/kubectl library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.