StatefulSet and ControllerRevision write permissions allow cross-namespace pod creation
Impact
A confused deputy attack exists in the StatefulSet controller that allows a user with namespace-scoped write permissions on StatefulSet and ControllerRevision objects to create a cross-namespace pod. An attacker exploiting this vulnerability would have full control over the resulting pod’s metadata and specification, including namespace selection. Note that the cross-namespace pod will be immediately deleted by the garbage collector unless the attacker is able to construct a valid StatefulSet OwnerReference. This would require referencing the UID of an existing StatefulSet in the victim’s…
Source excerpt · kubernetesThis would require referencing the UID of an existing StatefulSet in the victim’s namespace.
What to do
To mitigate this vulnerability, upgrade Kubernetes: https://kubernetes.io/docs/tasks/administer-cluster/cluster-upgrade/
Affected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
Kubernetes · Kubernetes
Other versions: unaffected
| Version / range | Source status |
|---|---|
| v1.34.0 through v1.34.11 (inclusive) | affected |
| v1.35.0 through v1.35.8 (inclusive) | affected |
| v1.36.0 through v1.36.4 (inclusive) | affected |
| v1.37.0 through v1.37.0 (inclusive) | affected |
Original source description
A confused deputy attack exists in the StatefulSet controller that allows a user with namespace-scoped write permissions on StatefulSet and ControllerRevision objects to create a cross-namespace pod. An attacker exploiting this vulnerability would have full control over the resulting pod’s metadata and specification, including namespace selection. Note that the cross-namespace pod will be immediately deleted by the garbage collector unless the attacker is able to construct a valid StatefulSet OwnerReference. This would require referencing the UID of an existing StatefulSet in the victim’s namespace.