Unused admin user with an active access key and no MFA
- Affected resources
- iam-user: deploy-admin
- account: example-prod (123456789012)
- policy: AdministratorAccess
- Evidence
- AWS CLI
$ aws iam get-credential-report --query Content --output text | base64 --decode \ | cut -d, -f1,4,8,9,11 | grep -E '^(user|deploy-admin),' user,password_enabled,mfa_active,access_key_1_active,access_key_1_last_used_date deploy-admin,true,false,true,2026-01-29T06:02:41+00:00 $ aws iam list-attached-user-policies --user-name deploy-admin \ --query 'AttachedPolicies[].PolicyName' --output text AdministratorAccess - Business impact
- Anyone who gets hold of this key or password has full administrator access to production, including customer data, and without MFA nothing stops them. Nobody has used the user for over 200 days, so misuse would not stand out, and the key never expires on its own.
- Fix
- Remove the console password and deactivate the key today. Deactivating can be undone if something still depends on the key.
- After two weeks without errors, delete the key and the user.
- Give people access through IAM Identity Center with MFA, and give pipelines their own roles with short-lived credentials.
AWS CLI$ aws iam delete-login-profile --user-name deploy-admin $ KEY_ID=$(aws iam list-access-keys --user-name deploy-admin \ --query 'AccessKeyMetadata[0].AccessKeyId' --output text) $ aws iam update-access-key --user-name deploy-admin \ --access-key-id "$KEY_ID" --status Inactive $ aws iam delete-access-key --user-name deploy-admin --access-key-id "$KEY_ID" $ aws iam detach-user-policy --user-name deploy-admin \ --policy-arn arn:aws:iam::aws:policy/AdministratorAccess $ aws iam delete-user --user-name deploy-admin- Benchmark reference
- CIS AWS Foundations, Identity and Access Management