Publicly assumable IAM role can escalate privileges to access sensitive data

Description

A publicly assumable IAM role can escalate privileges to access sensitive data. This configuration allows any AWS principal, including those from external AWS accounts, to assume the role and then leverage privilege escalation permissions to gain elevated access to resources containing sensitive information such as S3 buckets, RDS databases, or DynamoDB tables. An attacker with any valid AWS credentials can exploit this misconfigured trust policy, escalate privileges, and gain unauthorized access to protected data.

Remediation

  1. Review and manage IAM roles to restrict the trust policy and limit which principals can assume the role.
  2. Apply IAM security best practices to follow the principle of least privilege.