Granting the iam:AddUserToGroup action with a Resource value of "*" in an IAM role, such as in the example below, allows any user or role assigned this policy to add themselves or any user to any IAM group in the account.
This configuration creates a privilege escalation risk, as users may gain unauthorized permissions by adding themselves to groups with higher privileges, potentially leading to account compromise. Limiting both the allowed action and narrowing the resources by specifying particular group ARNs greatly reduces this attack surface.