Overly Permissive IAM Policies

IAM policies grant principals far broader permissions than they need, such as all actions on all resources, or permissions that let them raise their own privileges.

SeverityHigh
CVSS 3.18.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Open in the calculator
CVSS 4.08.7 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator
CWECWE-266: Incorrect Privilege Assignment
OWASP Top 10A06:2025 Insecure Design
MITRE ATT&CKT1098.003 Additional Cloud Roles, T1548.005 Temporary Elevated Cloud Access, T1098.001 Additional Cloud Credentials, T1078.004 Cloud Accounts
CategoryBroken Access Control

Description

IAM policies attached to users, groups or roles grant more than the principals' tasks require. Common forms are statements with "Action": "*" and "Resource": "*", the AWS managed AdministratorAccess policy attached to workloads or to people's everyday identities, service-wide wildcards such as iam:*, s3:* or kms:*, and NotAction statements that allow far more than intended. Any compromise of an over-privileged principal, whether a user's leaked access key, a role's credentials taken from a compromised EC2 instance or Lambda function, or a CI/CD pipeline's credentials, gives the attacker the excess permissions as well.

A less obvious form is a policy that looks limited but allows privilege escalation. Permissions such as iam:CreatePolicyVersion, iam:AttachUserPolicy, iam:PutRolePolicy, iam:UpdateAssumeRolePolicy, iam:CreateAccessKey on other users, or iam:PassRole combined with the ability to create or update EC2 instances, Lambda functions or other compute resources, let a principal grant itself, or act with, the permissions of a more privileged identity. Where a principal holds administrative or escalation permissions, a foothold that should have been contained therefore becomes control of the account: access to all data, creation of new users and keys for persistence, disabling of logging and, where roles are trusted by other accounts, movement into them. The more principals hold such permissions, the more routes an attacker has to that outcome.

The issue is identified by reviewing the policies attached to each principal, for example from aws iam get-account-authorization-details, and with tools that model escalation paths, such as Prowler, ScoutSuite, PMapper and Pacu. IAM Access Analyzer unused access findings show permissions that have not been used, which helps separate what principals need from what they merely hold.

Remediation

Reduce each principal to the permissions it needs:

  • Replace "Action": "*" and service-wide wildcards with the specific actions and resource ARNs each principal uses. IAM Access Analyzer can generate a policy from a principal's CloudTrail activity, and its unused access findings show unused services, actions, roles and keys.
  • Remove AdministratorAccess from workloads and from people's everyday identities, and give administrators separate roles that they assume only when needed.
  • Restrict IAM write actions and iam:PassRole to the few principals that manage IAM, limit iam:PassRole to specific role ARNs, and use the iam:PassedToService condition key to control which services roles can be passed to.
  • Apply permissions boundaries to principals that can create roles or users, and in an AWS organisation use service control policies to set limits that no policy in an account can exceed.
  • Validate policies before deployment with IAM Access Analyzer policy checks or an escalation-path tool such as PMapper.

Confirm the fix by repeating the policy review and escalation-path analysis, and checking that no principal outside the intended administrators can reach administrative permissions.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More AWS Findings

Every AWS finding