Check provider logo

Amazon Cognito user pool client has Prevent User Existence Errors enabled

cognito_user_pool_client_prevent_user_existence_errors

Severitymedium
Servicecognito
by Prowler

Amazon Cognito app clients use PreventUserExistenceErrors to suppress user-existence disclosures, keeping authentication, confirmation, and recovery responses generic rather than indicating whether a username exists.

Risk

If responses reveal user existence, adversaries can enumerate accounts, enabling targeted credential stuffing, brute force, and password-reset abuse. This facilitates account takeover, leaks PII, and can degrade availability through automated lockouts.

Run this check with Prowler CLI

prowler aws --checks cognito_user_pool_client_prevent_user_existence_errors

Recommendation

Enable user-existence suppression on all app clients (PreventUserExistenceErrors=ENABLED). Apply least disclosure with generic messages across all auth flows and aliases. Strengthen with MFA, rate limiting, and anomalous login detection for defense in depth.

Remediation

CLI

aws cognito-idp update-user-pool-client --user-pool-id <USER_POOL_ID> --client-id <APP_CLIENT_ID> --prevent-user-existence-errors ENABLED

Native IaC
Terraform
Other
  1. Open the Amazon Cognito console and go to User pools
  2. Select your user pool, then go to App integration > App clients
  3. Choose the target app client and click Edit
  4. Set Prevent user existence errors to Enabled
  5. Click Save changes

Source Code

Resource Type

Other

References