Skip to content

Get notified

Get an email when a new major security incident drops. No spam, unsubscribe any time.

Only used for pwn.watch incident emails. Protected by Cloudflare Turnstile.

Cloud, TLS & Containers11 min read

Kubernetes Ingress & AWS Cross-Account IAM Hardening Guide (2026)

How to harden Kubernetes ingress controllers and AWS cross-account access: isolate admission webhooks on the pod network, keep ingress annotations and controller versions under control, lock vendor roles down with External ID, source conditions and least privilege, and hunt for AssumeRole abuse, with lessons from IngressNightmare, Qubole, Kubeflow and AWS REX.

// key takeaways

  • Admission webhooks are network services. IngressNightmare (CVSS 9.8) let anything on the pod network reach the ingress-nginx validating webhook, run code, and read every secret the controller could read.
  • External ID is not an access control against the vendor itself. In the Qubole abuse every AssumeRole call carried a valid External ID and succeeded, because the attacker was using the vendor's own AWS account.
  • Unused trust is live trust. Most of the Qubole integration roles were no longer otherwise in use, yet they still trusted Qubole's account and still reached Secrets Manager, SSM parameters and S3.
  • Internal ML and platform UIs are attack surface. Kubeflow Pipelines before 2.18.0 let a caller read any file the artifact-serving pod could read, including mounted secrets and service account tokens when auth was off.
  • Copied examples become production. AWS told operators who built Rex-RO and Rex-RW SSM documents from a REX setup guide example to delete them, because the example allowed OS command injection.

Lesson 1: the ingress admission webhook is reachable from every pod

On March 24, 2025 Kubernetes and Wiz disclosed IngressNightmare. The ingress-nginx admission webhook, which validates Ingress objects before they are stored, could be made to load attacker-controlled configuration and run code. It required no authentication from the pod network and scored CVSS 9.8. Because the ingress-nginx controller typically has read access to secrets across the cluster, code execution there meant access to all cluster secrets the controller could read. The fixes shipped in controller v1.12.1 and v1.11.5; the documented stopgap was to disable the validating webhook.

The structural lesson is that admission webhooks are ordinary HTTPS services inside the cluster. The API server needs to reach them; workload pods do not. A NetworkPolicy that only allows the webhook port from the control plane would have turned an unauthenticated RCE from any compromised pod into a much narrower problem. The same applies to other controllers that run privileged webhooks.

  • Upgrade ingress-nginx to v1.12.1 or v1.11.5 or later; if you cannot, disable the validating admission webhook until you can.
  • Apply a NetworkPolicy so only the API server can reach admission webhook ports; deny all other ingress to controller pods by default.
  • Inventory every ValidatingWebhookConfiguration and MutatingWebhookConfiguration and the service behind each one.
  • Limit the controller's RBAC to the namespaces and secrets it actually serves instead of cluster-wide secret reads.
  • Never expose admission webhook services outside the cluster.
Find ingress-nginx versions and restrict the webhook port
# Which controller images are running? Fixed: v1.12.1 / v1.11.5
kubectl get pods -A -l app.kubernetes.io/name=ingress-nginx \
  -o jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{.spec.containers[*].image}{"\n"}{end}'

# Which webhooks exist and what services back them?
kubectl get validatingwebhookconfigurations -o wide

# Allow the webhook port (8443 by default) only from the control plane CIDR
cat <<'YAML' | kubectl apply -f -
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: ingress-nginx-admission-only-apiserver
  namespace: ingress-nginx
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/component: controller
  policyTypes: [Ingress]
  ingress:
    - from:
        - ipBlock: { cidr: 10.0.0.0/24 }   # replace with your control plane CIDR
      ports:
        - { protocol: TCP, port: 8443 }
    - ports:                               # keep normal HTTP(S) traffic
        - { protocol: TCP, port: 80 }
        - { protocol: TCP, port: 443 }
YAML

Ingress annotation and controller hygiene

IngressNightmare chained through the configuration the controller generates from Ingress objects, so who can create Ingress resources, and with which annotations, is a security decision. Annotations that inject raw nginx configuration snippets turn namespace-level write access into controller-level code. Restrict who can create or edit Ingress objects, disallow snippet-style annotations unless a platform team owns them, and enforce that with an admission policy.

The underlying nginx also needs patching on its own schedule. On October 14, 2026 nginx released 1.30.6 stable and 1.31.7 mainline with fixes for five medium-rated issues, including HTTP/3 request-body injection, TLS session-ticket forgery, an AIO use-after-free, and buffer overflows in alias/rewrite and map/regex paths. Controller images bundle a specific nginx build, so track both the controller release and the nginx version it ships.

  • Grant create and update on Ingress resources only to the teams and service accounts that need it.
  • Block configuration-snippet style annotations with an admission policy (Kyverno, Gatekeeper or ValidatingAdmissionPolicy) unless explicitly approved.
  • Track the nginx version inside each controller image; stable 1.30.6 and mainline 1.31.7 carry the October 2026 fixes.
  • Disable HTTP/3 on edges that do not need it until the bundled nginx is patched.
  • Alert on new Ingress objects with unusual annotations or in unexpected namespaces.

Lesson 2: vendor roles trust the vendor, including its compromised credentials

On November 9, 2026 Wiz, working with Sentra and Mandiant, reported that between October 14 and October 26 a threat actor used IAM credentials from an AWS account associated with Qubole, the data lake platform owned by Idera, to assume the IAM roles customers had created to trust Qubole's account. Every AssumeRole request carried a valid External ID and succeeded. Inside customer accounts the attacker enumerated resources, read Lambda environment variables, Secrets Manager secrets and SSM parameters, tested the credentials it found with TruffleHog, and downloaded S3 data, sometimes whole buckets. Wiz also saw a separate set of activity from October 8 to 11 using customer-owned AWS access keys it believes were created for Qubole integrations.

External ID prevents the confused-deputy problem, where some other customer of the vendor tricks the vendor into assuming your role. It does nothing when the vendor's own credentials are stolen, because the attacker can send the same External ID the vendor sends. The defences that would have helped are the ones that narrow what the vendor role can do and where it can be used from: least-privilege policies without secret reads, source IP or VPC endpoint conditions, and deleting roles once the integration ends. Wiz noted most of the abused roles were no longer otherwise in use.

  • Keep the sts:ExternalId condition on every vendor role, but do not treat it as protection against a breach of the vendor.
  • Add aws:SourceIp or aws:SourceVpce conditions so the role only works from the vendor's documented network ranges.
  • Scope vendor roles to the exact buckets and actions the integration needs; deny secretsmanager:GetSecretValue, ssm:GetParameter* and lambda:GetFunction* unless required.
  • Set a short MaxSessionDuration and require a recognisable role session name where the vendor supports it.
  • Inventory every role that trusts an external account, and delete roles and access keys for integrations you no longer use.
  • Never hand vendors long-lived IAM user access keys when a role will do.
Vendor role trust policy with External ID and source restriction
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": { "AWS": "arn:aws:iam::111122223333:root" },
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": { "sts:ExternalId": "unique-per-customer-id" },
        "IpAddress": { "aws:SourceIp": ["198.51.100.0/24"] }
      }
    }
  ]
}

Hunt for cross-account role abuse in CloudTrail

If any of your accounts ever connected Qubole, even one you stopped using, Wiz's guidance was to check CloudTrail from October 1, 2026 for AssumeRole calls from Qubole's account 805246085872 that came from outside AWS. Its indicators included role session names starting with quiam-, such as quiam-enum, the TruffleHog user agent on GetCallerIdentity, and VPN and VPS source addresses. If a role was assumed, rotate every secret, SSM parameter and Lambda environment variable it could reach and revoke its active sessions.

The same hunt generalises to every vendor. List the roles that trust external accounts, then look for AssumeRole from those principals with source IPs outside the vendor's published ranges, unusual session names, or follow-on calls the integration never makes, such as Secrets Manager reads or S3 ListBuckets across the account.

  • List roles whose trust policy names an external account and record the vendor, owner and last-used date.
  • Query CloudTrail for AssumeRole by each external principal and compare source IPs with the vendor's ranges.
  • Alert on secret reads, SSM parameter reads and GetCallerIdentity from vendor role sessions.
  • If abuse is confirmed, revoke the role's sessions, rotate every reachable secret, and review S3 data access logs.
Roles that trust other accounts, and recent AssumeRole events
# Roles whose trust policy names an AWS principal outside this account
ME=$(aws sts get-caller-identity --query Account --output text)
aws iam list-roles --query 'Roles[].[RoleName,AssumeRolePolicyDocument]' --output json \
  | jq -r --arg me "$ME" '.[] | select((.[1]|tostring|test("arn:aws:iam::[0-9]{12}")) and ((.[1]|tostring|test($me))|not)) | .[0]'

# Recent AssumeRole calls with caller account, source IP and session name
aws cloudtrail lookup-events \
  --lookup-attributes AttributeKey=EventName,AttributeValue=AssumeRole \
  --start-time 2026-10-01T00:00:00Z --max-results 50 \
  --query 'Events[].CloudTrailEvent' --output json \
  | jq -r '.[] | fromjson | [.eventTime, .userIdentity.accountId, .sourceIPAddress, .requestParameters.roleSessionName] | @tsv'

Lesson 3: internal platforms and copied examples need the same scrutiny

On October 29, 2026 Kubeflow disclosed that Kubeflow Pipelines before 2.18.0 did not confine the file path passed to its volume artifact handler to the selected volume. A caller who could reach the route and name an existing mounted volume could read any file the artifact-serving process could read. Deployments with authentication disabled needed no credentials. Kubeflow published three companion issues the same day: cross-tenant run log exposure and an archive upload decompression bomb, both fixed in 2.18.0, and cross-tenant artifact reads fixed in 2.17.0. If an instance was exposed without auth, its guidance was to assume mounted secrets and service account tokens may have been read and rotate them.

On November 6, 2026 AWS published bulletin 2026-173-AWS about an example in the Trusted Remote Execution (REX) setup documentation. The example created SSM documents named Rex-RO and Rex-RW, and the way it handled input parameters, including scriptArgs, let anyone allowed to invoke those documents run unintended OS commands on the managed instance outside the REX sandbox. Shipped REX artifacts were not affected. AWS removed the example from the guide; the only fix is deleting any Rex-RO and Rex-RW documents created from it in every account and Region where it was run.

  • Upgrade Kubeflow Pipelines to 2.18.0, keep ml-pipeline-ui and artifact-service off the public internet, and enable authentication.
  • Set automountServiceAccountToken: false on pods that do not call the Kubernetes API, so file-read bugs do not leak tokens.
  • Inventory custom SSM documents in every account and Region, and delete Rex-RO and Rex-RW if they came from the REX guide example.
  • Restrict ssm:SendCommand and ssm:StartSession to specific documents and instance tags rather than *.
  • Review any infrastructure built by copying vendor examples; examples are rarely written as production code.
Find example REX SSM documents in every Region
for r in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text); do
  aws ssm list-documents --region "$r" \
    --filters Key=Owner,Values=Self Key=Name,Values=Rex- \
    --query 'DocumentIdentifiers[].Name' --output text | sed "s/^/$r\t/"
done

# Delete after confirming they came from the guide example
# aws ssm delete-document --region <region> --name Rex-RO

// actionable engineering checklist

  • Patch ingress-nginx

    Run controller v1.12.1 or v1.11.5 or later; disable the validating webhook until you can.

  • Isolate admission webhooks

    NetworkPolicy allows webhook ports only from the API server; nothing outside the cluster reaches them.

  • Control Ingress annotations

    Limit who can create Ingress objects and block raw configuration snippets with an admission policy.

  • Track bundled nginx

    Controller and edge images carry nginx 1.30.6 stable or 1.31.7 mainline or later.

  • Scope vendor roles

    External ID plus source IP or VPC endpoint conditions, least-privilege policies and no default secret reads.

  • Delete unused trust

    Remove roles and access keys for integrations you no longer use; review every role that trusts an external account.

  • Hunt AssumeRole abuse

    Check CloudTrail for vendor AssumeRole from unexpected IPs, odd session names and follow-on secret reads.

  • Audit platforms and examples

    Kubeflow Pipelines 2.18.0, no auto-mounted tokens where unneeded, and delete Rex-RO / Rex-RW example SSM documents.

// connected pwn.watch tools & live trackers

Frequently Asked Questions

Does External ID protect my AWS role if the vendor is breached?
No. External ID stops other customers of the vendor from making it assume your role. An attacker holding the vendor's own credentials sends the same External ID, which is why every Qubole AssumeRole request succeeded. Add source IP or VPC endpoint conditions and least privilege.
How do I mitigate IngressNightmare if I cannot upgrade ingress-nginx yet?
Disable the validating admission webhook until you can move to controller v1.12.1 or v1.11.5, and restrict network access to the webhook port so only the API server can reach it.
Should I delete vendor roles I no longer use?
Yes. A role that still trusts a vendor account is live access even if the integration is idle. Most of the roles abused in the Qubole incident were no longer otherwise in use.
Is AWS REX itself vulnerable to the SSM command injection?
No. AWS said shipped REX artifacts are not affected. Only operators who created Rex-RO or Rex-RW SSM documents from the setup guide example need to delete them in each account and Region.

Get an email when a new major security incident drops. No spam, unsubscribe any time.