← RegistryDossier · 6 steps · 5 edges
GitHub OIDC trust over-broad → AWS admin
An IAM role trusts GitHub Actions OIDC with a wildcard 'repo:*' subject. Any attacker GitHub repo can assume the role and run with its privileges.
Filed by AD Knowledge Base
§ Kill-chainDrag · zoom · scroll
§ Context
Assumed environment: target uses GitHub OIDC for keyless AWS deploys. The role's trust policy uses a wildcard token.actions.githubusercontent.com sub claim (or 'repo:org/*').
§ Steps
- 01Push a public repo with a GH Actions workflowInitial AccessT1195— Supply Chain Compromise
- 02Find role ARN + trust policyReconnaissanceC-AWS-ACCT-ENUM— AWS Account ID Enumeration
- 03Workflow obtains OIDC token + AssumeRoleWithWebIdentityLateral MovementC-AWS-ASSUMEROLE-CHAIN— AWS sts:AssumeRole Chain
- 04Backdoor IAM userPersistenceC-AWS-IAM-BACKDOOR— AWS IAM Backdoor User / Access Key
- 05Exfil AWS keys / cloud secretsCredential AccessC-SECRETS-MANAGER-DUMP— Secrets Manager / Key Vault Dump
- 06Spot wildcard sub claimInitial AccessC-OIDC-TRUST-MISCONF— Cloud OIDC Trust Misconfiguration
§ References
§ Frequently asked
- What is the "GitHub OIDC trust over-broad → AWS admin" attack path?
- An IAM role trusts GitHub Actions OIDC with a wildcard 'repo:*' subject. Any attacker GitHub repo can assume the role and run with its privileges. It chains 6 steps drawn from real-world offensive-security techniques.
- What starting position does this attack require?
- The first step is Push a public repo with a GH Actions workflow (T1195) — a initial access primitive. Assumed environment: target uses GitHub OIDC for keyless AWS deploys.
- What is the final impact of this kill-chain?
- The final step lands on Spot wildcard sub claim (C-OIDC-TRUST-MISCONF), which falls under Initial Access. From here, an operator typically pivots into post-exploitation or maintains persistence.
- How can defenders detect or prevent this attack?
- Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.
§ Related dossiers
- Shared techniques2
pull_request_target injection → secrets → cloud takeover
A GitHub Actions workflow runs on pull_request_target and checks out the PR's head SHA. The attacker's PR injects code that runs with the base repo's secrets, including a cloud deploy role.
- Shared techniques2
SSRF → IMDS → AssumeRole chain → Org admin
A web SSRF leaks the EC2 instance role; iam:PassRole + sts:AssumeRole hops across two member accounts land you with AdministratorAccess in the organisation's management account.