Amazon Cognito Misconfiguration
A misconfigured Amazon Cognito user pool allowed an authenticated user to change their email attribute to an unverified address before verification, enabling account takeover. Another misconfiguration allowed users to modify their own role attribute, leading to privilege escalation.
Mohamed Lakhdar Metidji Follow
Published on systemweakness.com
Amazon Cognito is a fully-managed service from AWS that provides user authentication, authorization, and user management for web and mobile applications. It allows developers to easily add user sign-up, sign-in, and access control to their applications, as well as integrate with third-party identity providers such as…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could take over a victim's account by changing the email attribute to an unverified address, and could escalate their own privileges by changing their role attribute.
What the attacker needed
A valid account in the Cognito user pool; access to AWS CLI; knowledge of the victim's email address
The fix
AWS introduced a security configuration to keep the original attribute value when an update is pending, and developers should disable signup if not needed and restrict writable attributes.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Amazon Cognito is a service that handles user logins for apps. If it is set up wrongly, a user can change their own account details, like their email or role, without proper checks. This can let an attacker take over someone else's account or give themselves more permissions.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.