Business Logic Flaw Leading to Password Restriction Bypass
Users without assigned roles were blocked from changing their password through account settings and the forgot-password flow. By inviting an email that already had an account and then removing all roles, the forgot-password flow became available and allowed the user to set a new password, bypassing the restriction.
medium.com
Published on medium.com
My name is Osama Mohamed (0xmorv), and today I want to share a simple bug interesting Business Logic vulnerability that resulted in a password restriction bypass.
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
Root cause
Likely the invitation workflow for an existing account left the account in a state where the forgot-password restriction was not applied, even after roles were removed.
Impact
A user with no roles could bypass the password-change restriction and set a new password through the forgot-password flow.
What the attacker needed
An administrator account to invite users; an email address already registered on the platform
How it was found
- Create a user from an administrator account with an email address and password.
- Log out and try the Forgot Password page with the new account; the request is blocked.
- Invite an email address that already has an account on the platform through the administrator account.
- Accept the invitation and remove all assigned roles from that user.
- Try the Forgot Password page again; it now works and a reset link is generated.
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.
Some accounts are not allowed to change their own password; only an administrator can do it. The researcher found that if an existing user is invited to the platform and then has all roles removed, the 'forgot password' page still lets them set a new password. This means the rule that should stop them from changing their password can be avoided.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.