Researchers Demonstrate EKS Access Entry Escalation and Pod Identity Credential Theft Paths

· Original article ↗

Summary

The article analyzes how compromised IAM identities could gain EKS access and escalate privileges, and demonstrates intercepting Pod Identity tokens and temporary credentials from a host-network pod to access cloud resources.

Key points

  • With permissions to enumerate EKS access entries and policies, an attacker using a compromised IAM identity can identify accessible clusters and assess assigned Kubernetes privileges.
  • IAM principals with eks:CreateAccessEntry and eks:AssociateAccessPolicy may be able to grant themselves cluster-admin access; the article advises treating these permissions as highly privileged.
  • EKS View and Edit policies can expose risks including secrets in pod settings or logs, secret access, and paths to higher privileges; the article recommends least privilege and namespace scoping.
  • An attacker who compromises a host-network pod can capture traffic to the Pod Identity Agent at 169.254.170.23, including a JWT request and the returned temporary IAM credentials.
  • The captured credentials could let an attacker act as the associated IAM role and access cloud resources; activity spanning Kubernetes and cloud logs may complicate investigations.
  • The article contrasts Pod Identity with IRSA, stating that IRSA avoids sending tokens to the in-cluster endpoint and can prevent the described interception risk.

Article Details

Attack Vectors
  • A compromised IAM identity can enumerate EKS clusters and its associated access policies and Kubernetes groups using EKS Access Entries APIs.
  • An IAM principal with eks:CreateAccessEntry and eks:AssociateAccessPolicy permissions can grant itself cluster-admin access through AmazonEKSClusterAdminPolicy; CreateAccessEntry may also allow mapping the identity to an existing privileged Kubernetes group.
  • AmazonEKSEditPolicy access can enable privilege escalation by creating pods, executing into pods using privileged service accounts, or modifying sensitive ConfigMaps such as fluent-bit or node-problem-detector.
  • A compromised pod with hostNetwork enabled can intercept traffic to the Pod Identity Agent endpoint and capture JWT tokens and temporary IAM credentials requested by other pods on the same worker node.
  • An attacker with suitable Kubernetes permissions can abuse existing IRSA or Pod Identity permissions assigned to cluster pods to access cloud resources.
Defensive Notes
  • Apply least privilege to IAM and Kubernetes access; treat eks:CreateAccessEntry and eks:AssociateAccessPolicy as highly privileged permissions.
  • Avoid assigning AmazonEKSViewPolicy to untrusted principals; use granular Kubernetes RBAC permissions and namespace scope where possible.
  • Do not treat AmazonEKSEditPolicy as a security boundary because it grants secret access and may allow privilege escalation.
  • Review pod environment variables, process command lines, logs, and sensitive ConfigMaps for exposed secrets or privileged execution paths.
  • Consider IRSA to reduce the risk of token or credential sniffing described for Pod Identity, because it avoids exchanging the token through the internal Pod Identity Agent endpoint.

MITRE ATT&CK

Vendors

Products

Tools

Related Articles