Kubernetes default configuration is overly permissive, allowing users to escalate privileges or execute commands as privileged users.
Gain total control over one or more PoDs.
Set strict security policy disabling potentially harmful actions and restricting the user permissions.
Authenticated attacker with local access to PoD or container.
⌚ 30 minutes.
Default score using CVSS 3.1. It may change depending on the context of the src.
Default score using CVSS 4.0. It may change depending on the context of the src.
The resource has enabled safe security policies by restricting privileges to authorized users
apiVersion: v1
kind: Pod
metadata:
name: rss-site
labels:
app: web
spec:
privileged: false
containers:
- name: front-end
image: nginx
ports:
- containerPort: 80
securityContext:
capabilities:
add:
- SYS_ADMIN
- NET_ADMIN
- name: rss-reader
image: nickchase/rss-php-nginxv1
ports:
- containerPort: 88
apiVersion: v1
kind: Pod
metadata:
name: rss-site
labels:
app: web
spec:
containers:
- name: front-end
image: nginx
ports:
- containerPort: 80
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
add:
- NET_BIND_SERVICE
- name: rss-reader
image: nickchase/rss-php-nginxv1
ports:
- containerPort: 88
The resource does not enable safe security policies allowing privileged execution
apiVersion: v1
kind: Pod
metadata:
name: rss-site
labels:
app: web
spec:
privileged: true
containers:
- name: front-end
image: nginx
ports:
- containerPort: 80
securityContext:
capabilities:
add:
- SYS_ADMIN
- NET_ADMIN
- name: rss-reader
image: nickchase/rss-php-nginxv1
ports:
- containerPort: 88
apiVersion: v1
kind: Pod
metadata:
name: rss-site
labels:
app: web
spec:
containers:
- name: front-end
image: nginx
ports:
- containerPort: 80
securityContext:
allowPrivilegeEscalation: true
capabilities:
drop:
- all
add:
- NET_BIND_SERVICE
- name: rss-reader
image: nickchase/rss-php-nginxv1
ports:
- containerPort: 88
https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted https://kubernetes.io/docs/tasks/configure-pod-container/security-context/