Privilege Escalation via Invitation & Bypassed 2FA
A low-privileged member could see pending invitations, including an admin invitation sent to an email address. By registering a new account with that email and manipulating the 2FA response, the attacker gained admin privileges without verifying email ownership.
medium.com
Published on medium.com
Hello, I am Ahmed Mahmoud, I work as a penetration tester at HackerOne, today I will show you how I discovered an Privilege Escalation vulnerability in external program.
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 application trusted the client-side 2FA response and did not verify email ownership before attaching an invitation to a new account.
Impact
A low-privileged user could gain full admin access and bypass 2FA, exposing sensitive organizational data.
What the attacker needed
A free account; ability to intercept HTTP responses; no access to victim inbox needed
How it was found
- Register a new email and create an organization.
- As an Owner, invite a low-privileged user (e.g., a member) to join the organization.
- As an Owner, send an invitation to [redacted] with role admin.
- As a member, view all pending invitations, including their roles and email addresses.
- Register a new account using the same invited email address without needing access to the inbox.
- When prompted for 2FA, enter any arbitrary code, intercept the request, and modify the server response from 400 Bad Request to 200 OK.
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.
A user with low permissions could see invitations that were meant for others, including one that offered an admin role. They then created a new account using the invited email address and tricked the system into thinking they had passed two-factor authentication (2FA), a second security check. This let them become an admin without ever proving they owned the email.
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.