Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-21008-Kubernetes-Service-Account-Token-Mounted-in-HostPath — Proof-of-concept exploit for Kubernetes service-account token disclosure via hostPath mounts; includes vulnerable pod YAML and Python token-theft script. | Kitploit
Tools/GitHubGitHub/george0papasotiriou/cve-2026-21008-kubernetes-service-account-token-mounted-in-hostpath
Cloud Infrastructure SecurityPrivilege EscalationContainer SecurityExploitationPost-ExploitationCloud SecurityMisconfiguration
GitHubgeorge0papasotiriou/cve-2026-21008-kubernetes-service-account-token-mounted-in-hostpath

CVE-2026-21008-Kubernetes-Service-Account-Token-Mounted-in-HostPath

Proof-of-concept exploit for Kubernetes service-account token disclosure via hostPath mounts; includes vulnerable pod YAML and Python token-theft script.

View Repository
101 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-21008 – Kubernetes Service Account Token Mounted in HostPath

Program Code (YAML + Python exploit)

root@kitploit:~
# vulnerable-pod.yaml - Pod that mounts /var/run/secrets/kubernetes.io/serviceaccount into a hostPath
apiVersion: v1
kind: Pod
metadata:
  name: sa-token-leak
spec:
  containers:
  - name: app
    image: nginx
    volumeMounts:
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: sa-token
  volumes:
  - name: sa-token
    hostPath:
      path: /var/run/secrets/kubernetes.io/serviceaccount  # Writable by container? Not needed.
      type: Directory

CVE-2026-21008 – Kubernetes SA Token Leak via hostPath Mount

Severity: High

Overview

A pod mounts the Kubernetes service account token directory via hostPath instead of the default projected volume. This exposes the token to other pods on the same node if they can read the host filesystem, allowing lateral movement and cluster compromise.

Vulnerability Details

  • Type: Information Disclosure / Privilege Escalation
  • Impact: Cluster admin access via stolen SA token.
  • Root Cause: Using hostPath to mount the SA token directory bypasses the in‑memory token projection and makes the token a persistent file on the node.

Exploit Demonstration

Deploy the vulnerable pod, then from another pod with host access, run:

root@kitploit:~
python exploit_sa_token.py

The token is read and can be used to authenticate to the API server.

Download Tool