Intel

AIKIDO-2026-334127

k8s.io/kubectl is vulnerable to Path Traversal

Path TraversalCVE-2026-19444 Published Yesterday

65

Medium Risk

This Affects:

GOk8s.io/kubectl
0.34.0 - 0.34.11
Fixed in 0.34.12
0.35.0 - 0.35.8
Fixed in 0.35.9
0.36.0 - 0.36.4
Fixed in 0.36.5
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

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.

How to fix this

Upgrade the k8s.io/kubectl library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform