MEDIUM
Source
Trivy/CSPM
CSPM ID
password-reuse-prevention
Frameworks

CIS AWS 1.2

CIS AWS 1.4

ID
AVD-AWS-0056

IAM Password policy should prevent password reuse.

IAM account password policies should prevent the reuse of passwords.

The account password policy should be set to prevent using any of the last five used passwords.

Impact

Password reuse increase the risk of compromised passwords being abused

Follow the appropriate remediation steps below to resolve the issue.

  1. Log in to the AWS Management Console.

  2. Select the “Services” option and search for IAM. Step

  3. Scroll down the left navigation panel and choose “Account Settings” under “Access management”. Step

  4. Under the “Password Policy” configuration panel scroll down and click on “Change password policy” button.Step

  5. On the “Set password policy” page scroll down and check the “Prevent password reuse”. If the checkbox is not selected then the password policy does not prevent the reuse of password.Step

  6. Click on the checkbox next to “Prevent password reuse” so “Password Policy” prevents reuse of the older passwords. Enter the “Number of passwords to remember” to 24. Step

  7. Click on the “Save changes” button to make the necessary changes.Step

  8. Now “Password Policy” will prevent reuse of the older passwords for all the IAM users.

Prevent password reuse in the policy

1
2
3
4
5
6
 resource "aws_iam_account_password_policy" "good_example" {
 	# ...
 	password_reuse_prevention = 5
 	# ...
 }