Customer-managed IAM policies are evaluated for permissions that enable privilege escalation, including creating or updating policies, altering role trust, attaching higher-privilege policies, or using iam:PassRole to obtain broader access.
Risk
Privilege-escalation permissions let principals assume higher-privilege roles or attach admin policies, impacting:
- Confidentiality via unauthorized data access/exfiltration
- Integrity by modifying policies, configs, or logs
- Availability through resource deletion or disabling controls
Run this check with Prowler CLI
prowler aws --checks iam_policy_allows_privilege_escalation
Recommendation
Apply least privilege to customer policies:
- Avoid wildcards in
ActionandResource - Remove or tightly scope
iam:PassRole, policy attach/update, and trust-policy changes - Use conditions like
iam:PassedToServiceand tags to constrain use - Enforce permissions boundaries and SCPs
- Separate duties with change review
Remediation
CLI
aws iam create-policy-version --policy-arn <example_resource_id> --set-as-default --policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Action":"","Resource":""}]}'
Native IaC
Terraform
Other
- In the AWS Console, go to IAM > Policies
- Open the customer managed policy showing FAIL
- Click Edit policy > JSON
- Remove any Allow statements that enable privilege-escalation actions (for example broad wildcards like "iam:*" or actions such as creating/updating/attaching policies, PassRole, or AssumeRole on wildcards)
- Save changes so the policy no longer allows those actions
- Re-run the check to confirm it passes
Source Code
Resource Type
AwsIamPolicy
References
- https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege
- https://bishopfox.com/blog/privilege-escalation-in-aws
- https://github.com/RhinoSecurityLabs/Security-Research/blob/master/tools/aws-pentest-tools/aws_escalate.py
- https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/
- https://labs.reversec.com/posts/2025/08/another-ecs-privilege-escalation-path