Allowing users the iam:CreateLoginProfile action with the Resource set to "*" in AWS IAM policies permits them to set a password for any IAM user, thereby enabling direct console access. This creates a privilege escalation vulnerability, as the user can potentially assign login profiles to high-privilege accounts, leading to unauthorized access and control over critical AWS resources. To mitigate this risk, restrict the Resource to specific user ARNs and avoid assigning broad permissions, as shown in the following secure Terraform configuration: