Overview

FieldValue
ID1001
NameNamespaced pod exec
Risk CategoryElevation of Privilege
Risk LevelHigh
Role TypeRole
API Groupscore
Resourcespods/exec
Verbscreate
TagsCodeExecution LateralMovement PodExec PotentialPrivilegeEscalation

Description

Permits executing commands within pods in a specific namespace. This grants shell access to containers within that namespace, potentially leading to code execution, lateral movement within the namespace, and privilege escalation if sensitive workloads or service accounts are compromised.

Abuse Scenarios

  1. Execute a non-interactive command inside a specific pod within the namespace.
bash
kubectl exec <pod-name> -n <namespace> -- cat /etc/passwd
# Example: kubectl exec my-app-pod-xyz -n default -- env
  1. Obtain an interactive shell inside a specific pod within the namespace.
bash
kubectl exec -it <pod-name> -n <namespace> -- sh
# Example: kubectl exec -it my-database-pod -n production -- bash