Skip to main content
emnode / learn
Compliance Medium severity

AWS Security Hub · Cognito

Cognito.5: Cognito users can sign in without MFA

Written and reviewed by Emnode · Last reviewed

What does AWS Security Hub Cognito.5 check?

Cognito.5 checks a user pool's MfaConfiguration and fails unless it is set to ON, meaning MFA is required for every sign-in. OFF disables MFA entirely and OPTIONAL leaves enrolment to each user — only ON actually closes the credential-leak path.

Why does Cognito.5 matter?

Credential-stuffing against consumer apps is continuous, automated, and cheap — a leaked password from any unrelated breach gets replayed against every Cognito login endpoint on the internet. With OPTIONAL MFA, the 85-95% of users who never enrol are protected by exactly one factor: a password they probably reused. PCI DSS 4.0 (effective March 2025) requires MFA for all access, not just admin access.

How do I fix Cognito.5?

  1. Set MfaConfiguration to ON so every user must enrol and present a second factor.
  2. Enable TOTP and/or SMS factors and verify the enrolment experience for existing users.
  3. Roll the change with a forced-enrolment-on-next-login flow rather than locking users out.

Remediation script · bash

# Root MFA has no CLI equivalent: register it in the console while signed in as root
# (Security credentials > Multi-factor authentication > Assign MFA device).
# Then verify a device is bound to the root ARN and the summary flag flips to 1.
aws iam list-virtual-mfa-devices --assignment-status Assigned \
  --query 'VirtualMFADevices[?ends_with(SerialNumber, `:mfa/root-account-mfa-device`)].SerialNumber'
aws iam get-account-summary --query 'SummaryMap.AccountMFAEnabled'

# Enforce MFA on human IAM users with a conditional-deny policy keyed on the MFA flag.
aws iam attach-group-policy --group-name HumanUsers \
  --policy-arn arn:aws:iam::123456789012:policy/RequireMFAForUsers

# Require MFA pool-wide on a customer-facing Cognito pool.
aws cognito-idp set-user-pool-mfa-config --user-pool-id eu-west-1_aB3cD4eFg \
  --mfa-configuration ON --software-token-mfa-configuration Enabled=true

Full walkthrough (console steps, edge cases and verification) in the lesson Enable MFA for root and IAM users.

Is Cognito.5 a false positive?

OPTIONAL MFA gives the illusion of protection on the dashboard but not the reality — most users never enrol. The control only passes at ON, where unenrolled users are forced through enrolment on next login.

Part of the learning path Lock down access
  • Cognito.1 Cognito threat protection is not enforced
  • Cognito.3 Cognito password policy is too weak
  • Cognito.4 Cognito threat protection is not enforced
  • Cognito.6 A Cognito user pool can be deleted by accident