IAM inline policies are evaluated for permission combinations that enable privilege escalation, such as sts:AssumeRole, iam:PassRole, attaching/editing policies, or broad wildcards. The result highlights inline policies that allow a principal to obtain higher effective access.
Risk
Excessive inline policy permissions let identities escalate to admin, compromising CIA:
- Confidentiality: read secrets and data
- Integrity: alter policies, code, and configs
- Availability: delete or stop resources, disable logging Attackers can persist by creating keys/users or assuming powerful roles.
Run this check with Prowler CLI
prowler aws --checks iam_inline_policy_allows_privilege_escalation
Recommendation
Apply least privilege and remove escalation paths:
- Avoid wildcards and sensitive actions like
sts:AssumeRole,iam:PassRole, or policy modification without tight scope - Restrict by resource and
Condition - Prefer managed, versioned policies; use permissions boundaries/SCPs
- Require reviews and MFA for admins
Remediation
Native IaC
Terraform
Other
- In the AWS Console, go to IAM > Users/Roles/Groups and select the entity with the failing inline policy
- In the Permissions tab, under Inline policies, choose the flagged policy and click Edit
- Remove privilege-escalation actions (e.g., iam:CreatePolicyVersion, iam:AttachUserPolicy, iam:PassRole, sts:AssumeRole, iam:UpdateAssumeRolePolicy)
- Keep only the minimum required, non-escalating permissions (for example, read-only actions)
- Save changes
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