Publicly assumable IAM role can access sensitive data

Description

A publicly assumable IAM role has direct access to sensitive data. This configuration allows any AWS principal, including those from external AWS accounts, to assume the role and directly access sensitive resources such as S3 buckets, RDS databases, or DynamoDB tables. An attacker with any valid AWS credentials can exploit this misconfigured trust policy to 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 remove unnecessary access to sensitive data.