CVE-2024-10220:
Kubernetes kubelet arbitrary command execution
8.1
Basic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
k8s.io/kubernetes | go | < 1.28.12 | 1.28.12 |
k8s.io/kubernetes | go | >= 1.29.0, < 1.29.7 | 1.29.7 |
k8s.io/kubernetes | go | >= 1.30.0, < 1.30.3 | 1.30.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability allows arbitrary command execution via specially crafted gitRepo volumes. The provided commit 1ab06efe92d8e898ca1931471c9533ce94aba29b
patches the validateVolume
function in pkg/volume/git_repo/git_repo.go
. This function is responsible for validating the parameters of a GitRepo volume. The patch adds a check to ensure that if both a Revision
and a Directory
are specified, the Directory
field does not contain path separators (e.g., /
or \\
). This prevents path traversal attacks where an attacker could specify a Directory
like ../.git/hooks
in conjunction with a Revision
to potentially write executable git hooks into an unexpected location, leading to command execution when git checkout
or similar commands are run by the kubelet. The validateVolume
function is where the vulnerable input (src.Directory
and src.Revision
) is processed, and the lack of proper validation here was the root cause. Therefore, this function would be active during the setup of a malicious gitRepo volume and is central to the exploitation of the vulnerability.