Account Takeover via IDOR in GraphQL Invitation Flow
The GraphQL invitation response exposed an activation token that was directly usable in the account activation URL, with no check that the requester owned the invited email address. An attacker could invite any email, take the token from the response, and complete account creation for that address without access to its inbox.
Published on scriptjacker.medium.com
Hey Hackers, I am Parth Narula. A penetration tester, bug hunter, red teamer and overall a security researcher.
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
The invitation mutation returned the activation token to the inviter, and the activation endpoint accepted that token without verifying that the activator controlled the invited email address.
Impact
An attacker with a team owner account could create and control accounts for arbitrary email addresses without access to those inboxes, which could lead to account takeover of the invited users.
What the attacker needed
A team owner account on the SaaS; ability to intercept HTTP traffic
The fix
The activation token should not be returned in the invitation response, and activation should require proof that the activator controls the invited email address.
How it was found
- As a team owner, open the Invite Agents modal and enter a victim's email address.
- Intercept the GraphQL invite mutation in a proxy and note the invitation id in the response.
- Build the activation URL by replacing the token in the known /signup/activate/ path with that id.
- Open the URL, which loads the activation page without any email click.
- Set a name and password and submit the form to create the account.
- Refresh the team page to see the invited email listed as an active agent.
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 you invite someone to a service, the service usually emails them a secret link to finish signing up. Here the service also put that secret link's code in the reply to the person doing the inviting, and the sign-up page accepted the code without checking it belonged to the right person. So anyone who could invite an email address could finish creating that person's account themselves.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.