Pivot into EKS from Prompt Injection
Turn a prompt-injection flaw on an AI concierge into an EKS and AWS supply-chain compromise of the customer database
Overview
ShopNest has launched Nova, an AI shopping concierge bolted onto its storefront, and deployed the platform onto an AWS-hosted EKS cluster. Nova's account actions are governed by instructions written into its prompt rather than by server-side checks, the internal tooling trusts anything inside the cluster, and a continuous-deployment job re-pulls and runs whatever a mutable image tag points to.
You start as an external attacker with no credentials and only the application URL. You take over a staff administrator through a prompt-as-authorization flaw, use a GraphQL server-side request forgery to reach an internal service, gain code execution in-cluster, and walk the trust between the application, the cluster and the AWS account through a container image supply-chain attack to reach the customer database.
Objectives
From the storefront URL alone, chain a prompt-injection account takeover, a GraphQL SSRF, in-cluster code execution and a poisoned container image into AWS Secrets Manager access and exfiltration of customer data.
Prerequisites
- Basic familiarity with intercepting and modifying HTTP requests using a proxy such as Burp Suite
- Understanding of how large language model tool (function) calling works at a high level
- Comfort reading and writing GraphQL queries and mutations
- Working knowledge of the AWS CLI and core IAM concepts
- Basic Kubernetes knowledge including service accounts, secrets, and RBAC
- Awareness of container images, tags, and how a CD pipeline rolls out a new image
Learning outcomes
- Enumerate the platform user directory through an unauthenticated broken-authorization API endpoint
- Enumerate an AI assistant's hidden account capabilities through conversation
- Leak a language model's system prompt and the privileged identity it references
- Exploit a prompt-as-authorization flaw to reset a staff administrator's password
- Identify an administrator-only GraphQL mutation through schema introspection
- Leverage a server-side request forgery resolver to reach an internal-only service
- Achieve remote code execution through an unsandboxed evaluation sink inside a pod
- Enumerate IAM Roles for Service Accounts configuration and recognize a dead-end role
- Discover leaked CI/CD registry push credentials stored in a Kubernetes secret
- Read a target image's real entrypoint before overwriting it, so the poisoned pod stays healthy
- Poison a mutable container image tag daemonlessly with crane
- Abuse a CD reconciler and imagePullPolicy Always to run the malicious image
- Steal a more-privileged workload's IRSA web-identity token from the poisoned image
- Retrieve database credentials from AWS Secrets Manager as the crossed-into identity
- Exfiltrate customer personally identifiable information from an internal database
Real-world context
Cloud-native compromises rarely begin with a zero-day. Attackers typically find one exposed weakness and walk the trust between the application, the cluster and the cloud account. Two patterns drive this chain. First, AI assistants are often handed tools more powerful than their caller, with authorization written into the prompt instead of enforced on the server, so whoever can steer the model inherits those tools, and from there an SSRF or an unauthenticated internal service turns one foothold into code execution inside the cluster.
Second, the deployment pipeline is frequently treated as plumbing when in practice it is one of the most powerful identities on the platform. If a registry tag is mutable and the push credential is readable from a pod, anyone who can overwrite that tag runs code as whichever workload pulls it, including the AWS role it is federated to.