Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
cognito_user_pool_client_prevent_user_existence_errorsProvider: AWS
Service:
cognitoSeverity: MEDIUM
Categories:
identity-accessResource type:
OtherWhat this check verifies
Amazon Cognito app clients usePreventUserExistenceErrors 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.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
- Terraform
- Native IaC
- Dashboard steps
aws cognito-idp update-user-pool-client —user-pool-id <USER_POOL_ID> —client-id <APP_CLIENT_ID> —prevent-user-existence-errors ENABLED
References
- https://repost.aws/knowledge-center/cognito-prevent-user-existence-errors
- https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-managing-errors.html
- https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-client-apps.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-cognito-userpoolclient.html
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = cognito_user_pool_client_prevent_user_existence_errors. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks