VYPR
High severity8.1NVD Advisory· Published Nov 22, 2024· Updated Apr 15, 2026

CVE-2024-10220

CVE-2024-10220

Description

The Kubernetes kubelet component allows arbitrary command execution via specially crafted gitRepo volumes.This issue affects kubelet: through 1.28.11, from 1.29.0 through 1.29.6, from 1.30.0 through 1.30.2.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
k8s.io/kubernetesGo
< 1.28.121.28.12
k8s.io/kubernetesGo
>= 1.29.0, < 1.29.71.29.7
k8s.io/kubernetesGo
>= 1.30.0, < 1.30.31.30.3

Patches

1
1ab06efe92d8

Merge pull request #124531 from irsl/master

https://github.com/kubernetes/kubernetesKubernetes Prow RobotMay 4, 2024via ghsa
2 files changed · +20 0
  • pkg/volume/git_repo/git_repo.go+6 0 modified
    @@ -261,6 +261,12 @@ func validateVolume(src *v1.GitRepoVolumeSource) error {
     	if err := validateNonFlagArgument(src.Directory, "directory"); err != nil {
     		return err
     	}
    +	if (src.Revision != "") && (src.Directory != "") {
    +		cleanedDir := filepath.Clean(src.Directory)
    +		if strings.Contains(cleanedDir, "/") || (strings.Contains(cleanedDir, "\\")) {
    +			return fmt.Errorf("%q is not a valid directory, it must not contain a directory separator", src.Directory)
    +		}
    +	}
     	return nil
     }
     
    
  • pkg/volume/git_repo/git_repo_test.go+14 0 modified
    @@ -267,6 +267,20 @@ func TestPlugin(t *testing.T) {
     			},
     			isExpectedFailure: true,
     		},
    +		{
    +			name: "invalid-revision-directory-combo",
    +			vol: &v1.Volume{
    +				Name: "vol1",
    +				VolumeSource: v1.VolumeSource{
    +					GitRepo: &v1.GitRepoVolumeSource{
    +						Repository: gitURL,
    +						Revision:   "main",
    +						Directory:  "foo/bar",
    +					},
    +				},
    +			},
    +			isExpectedFailure: true,
    +		},
     	}
     
     	for _, scenario := range scenarios {
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.