From Removed Admin To Full Takeover
A removed administrator could still use a previously generated password reset link to reset another admin's password and regain access to the organisation. This allowed privilege escalation and account takeover.
Today’s write-up is about an intended feature that I turned into a security flaw a few months back all by shifting my perspective. Alḥamdulillāh.
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 password reset tokens were not invalidated when the admin who generated them was removed from the organisation, and the reset link was visible to other admins.
Impact
A removed admin could regain access to the organisation, escalate privileges, and take over other admin accounts, potentially disrupting trust and control.
What the attacker needed
Admin privileges in the organisation; ability to generate reset links for other admins; victim admin account exists
The fix
The reset link should only be visible to the intended recipient, and all reset tokens should be invalidated when a user is removed.
How it was found
- Log in as the root user and invite two users as Admins.
- Generate a password reset link for one admin (AdminC).
- AdminA copies and saves the reset link.
- The root user removes AdminA from the organisation.
- AdminA uses the saved link to reset AdminC's password.
- AdminA logs in as AdminC and regains access.
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.
When an admin resets another user's password, the system creates a special link that lets the user set a new password. The problem was that this link kept working even after the admin who created it was removed from the organisation. So a removed admin could still use the old link to take over another admin's account.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.