Business logic flaw in the invitation system allows to Takeover any account at a private company
The invitation acceptance endpoint allowed the invited user to change the email address in the request to any other user's email, and the server would set a new password for that account. An attacker could take over any account by inviting their own email, intercepting the acceptance request, and changing the email to the victim's address.
{{media:0}}
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.
Context
A private company launched a public bug bounty program, and the researcher's team, Vendetta, found the target through a Google dork. The application is a multi-user service where an organisation account can hold several users, and the feature under review is the invitation system: an existing member of an organisation can invite new users from the "Users" section of the account.
Normally the flow is simple. The inviter enters an email address, the invited person receives a message containing a token, and following that link lets the invitee set a password and join the organisation. Nothing in that description involves changing the password of an existing account, which is exactly where the logic went wrong.
Setup
The researcher worked as a normal user of the application and captured and read every request with a traffic interceptor, Burp Suite being the example given. The only precondition for the attack is an account on the target that is allowed to invite users to an organisation, plus an email address the attacker controls so the invitation can be received and accepted. No special role, version or configuration is mentioned.
Finding it
While walking through the invitation feature, the researcher looked at the link delivered to the invited user:
https://app.redacted.com/reset-multi-user-password/INVITE-TOKEN-HERE
The path segment reset-multi-user-password stood out. The feature is supposed to add a user to a company account, so why does the invitation link point at a password reset endpoint? That mismatch between the name of the endpoint and the purpose of the feature is the signal that led to the rest of the work.

The screenshot shows the "Users" section of the organisation account, where new users are invited.
Exploitation
Step 1: accept the invitation and watch the request
Going deeper, the researcher accepted the invitation. At that point the application sent a POST request to /activate-invited-user with the invited email address in the request body.

The key observation is that the body of that request carries both the email and the new password, and both are supplied by the invited user. The invitation token proves that the person holds the invited mailbox, but the email field itself is just client-controlled input.
Step 2: reason about the trust boundary
The researcher's reasoning was: the invited user receives the token through the reset-multi-user-password endpoint, and then controls the invited email and the new password in the activation request. So what happens if the invited email is replaced with [redacted] and the request is forwarded with a new password?
Step 3: tamper with the email field
The "accept invite" request was captured and the email value was changed to [redacted], together with a new password chosen by the attacker.
The server accepted the request. The server accepted the request.
Step 4: confirm the takeover
The researcher then logged in as [redacted] using the new password, which confirmed that the account had been taken over.
Proof of concept sent to the security team
- Login to your account at https://app.redacted.com
- Now invite any email that you also control under "Users" section
- Click in the invite link and you'll see a page where it will ask for you to create a new password for the account, intercept the request
- Just change the
emailto any other user account at your application and forward the request - You have now set a new password for the "victim" email using an invitation token
The security team triaged and resolved the vulnerability quickly.
Root cause
The activation endpoint trusted the email address supplied in the request body instead of deriving the account from the invitation token. The activation endpoint accepted the email address supplied in the request body, so a token issued for one address could be redeemed against another. Because the same endpoint also sets a password, the result is a password reset for an arbitrary account rather than a simple authorisation bypass.
Impact
An attacker with any account that can send invitations, and an email address they control, can set a new password on any account in the application, including the organisation owner, and then log in as that user. The takeover happens without the victim's consent and without any interaction from the victim. The report describes the target as a private company's service and does not quantify how many accounts or organisations were exposed.
Fix
The report only states that the security team triaged and resolved the vulnerability; it does not describe the change that was made. A fix would be to stop accepting the email from the request body at activation time and instead resolve the account from the invitation token server side.
Variants to test
- Invite an address you control, accept the invitation, and change the
emailin the activation body to another account. A positive result is a successful response and a login with the password you supplied. - Look for other endpoints that take an identifier in the body alongside a token, such as email change, member removal or role assignment, and swap the identifier for another user's. A positive result is the action being applied to the other user.
- Check whether the invitation token is bound to the invited address at all by replaying a token issued for one address against a different one. A positive result is acceptance rather than a rejection.
- Inspect endpoint names for mismatches like
reset-multi-user-passwordon an invitation flow, and test whether the reset and invite paths share tokens or state. A positive result is a token from one flow being accepted by the other.
What happened, in plain words
A company ran a bug bounty programme. A bug bounty programme is a public offer from a company: if you find a security problem in their website or app and report it responsibly, they may reward you. The researcher's team, Vendetta, found the target through a Google dork, which is a search query crafted to surface pages or sites that are not meant to be prominent. The application is a multi-user service: one organisation account can hold several users, like a shared workspace where several people log in under the same company.
The feature under review is the invitation system. An existing member of an organisation can go to the "Users" section of the account and invite new people. Normally the flow is simple: the inviter types an email address, the invited person receives a message containing a token, and following that link lets the invitee set a password and join the organisation. A token here is a long random string that acts like a temporary key: whoever holds it is treated as the person the invitation was sent to. Nothing in that description involves changing the password of an existing account, and that is exactly where the logic went wrong.
A "business logic flaw" is not a broken lock or a crashed server. It is a rule of the application that can be bent because the program trusts something it should not. Think of a hotel receptionist who checks that your key card is valid but never checks which room number you say out loud. The card is real, so you get in, but not to your room.
Setting up
The researcher worked as a normal user of the application and captured and read every request with a traffic interceptor. A traffic interceptor is a tool that sits between your browser and the website and lets you pause, read and edit the messages going in both directions. Burp Suite is the example given. The only precondition for the attack is an account on the target that is allowed to invite users to an organisation, plus an email address the attacker controls so the invitation can be received and accepted. No special role, version or configuration is mentioned.
Finding it
While walking through the invitation feature, the researcher looked at the link delivered to the invited user:
https://app.redacted.com/reset-multi-user-password/INVITE-TOKEN-HERE
Line by line: https:// is the normal secure web protocol. app.redacted.com is the address of the application; the real name has been replaced with redacted to protect the company. /reset-multi-user-password/ is the path, the part of the address that tells the server which feature to run. INVITE-TOKEN-HERE is where the unique token for this particular invitation would sit.
The path segment reset-multi-user-password stood out. The feature is supposed to add a user to a company account, so why does the invitation link point at a password reset endpoint? An endpoint is simply a specific address on a server that performs one job, like a counter in a building: you go to the counter for passports, not the one for driving licences. That mismatch between the name of the endpoint and the purpose of the feature is the signal that led to the rest of the work. Reading endpoint names is one of the cheapest things a beginner can do, because names often reveal what the code underneath was copied from.

The screenshot shows the "Users" section of the organisation account, where new users are invited.
Exploitation
Step 1: accept the invitation and watch the request
Going deeper, the researcher accepted the invitation. At that point the application sent a POST request to /activate-invited-user with the invited email address in the request body. A POST request is the kind of message a browser sends when it is submitting data, for example when you fill in a form and press a button. The request body is the part of that message that carries the data itself, as opposed to the address it is sent to.

The key observation is that the body of that request carries both the email and the new password, and both are supplied by the invited user. The invitation token proves that the person holds the invited mailbox, but the email field itself is just client-controlled input. "Client-controlled" means the value comes from the browser, and the browser belongs to the user, so the user can change it before it is sent. A useful comparison: a form on paper where you write your own name. The clerk can check that you have an appointment slip, but if the clerk reads the name off the paper instead of off the slip, you can write any name you like.
Step 2: reason about the trust boundary
The researcher's reasoning was: the invited user receives the token through the reset-multi-user-password endpoint, and then controls the invited email and the new password in the activation request. So what happens if the invited email is replaced with [redacted] and the request is forwarded with a new password? A trust boundary is the line between what the server knows for certain and what it merely accepts from the user. The token is on the trusted side; the email in the body is on the untrusted side.
Step 3: tamper with the email field
The "accept invite" request was captured and the email value was changed to [redacted], together with a new password chosen by the attacker.
The server accepted the request. The server accepted the request. In other words, the server checked the slip but read the name off the paper.
Step 4: confirm the takeover
The researcher then logged in as [redacted] using the new password, which confirmed that the account had been taken over. "Account takeover" means logging in as somebody else and having full use of their account, in this case the organisation owner.
Proof of concept sent to the security team
A proof of concept is a short, repeatable set of steps that shows the problem is real, so the defenders can reproduce it themselves.
- Login to your account at https://app.redacted.com
- Now invite any email that you also control under "Users" section
- Click in the invite link and you'll see a page where it will ask for you to create a new password for the account, intercept the request
- Just change the
emailto any other user account at your application and forward the request - You have now set a new password for the "victim" email using an invitation token
The security team triaged and resolved the vulnerability quickly. Triaged means they confirmed the report was valid and sorted it for fixing; resolved means the problem was closed.
Root cause
The activation endpoint trusted the email address supplied in the request body instead of deriving the account from the invitation token. The activation endpoint accepted the email address supplied in the request body, so a token issued for one address could be redeemed against another. Because the same endpoint also sets a password, the result is a password reset for an arbitrary account rather than a simple authorisation bypass. Authorisation is the process of deciding whether a logged-in user is allowed to do a particular thing; a bypass means skipping that check. Here the check was not skipped so much as pointed at the wrong person.
Impact
An attacker with any account that can send invitations, and an email address they control, can set a new password on any account in the application, including the organisation owner, and then log in as that user. The takeover happens without the victim's consent and without any interaction from the victim: the victim does not have to click anything or approve anything. The report describes the target as a private company's service and does not quantify how many accounts or organisations were exposed.
Fix
The report only states that the security team triaged and resolved the vulnerability; it does not describe the change that was made. A fix would be to stop accepting the email from the request body at activation time and instead resolve the account from the invitation token server side. "Server side" means the decision is made on the server, where the user cannot edit it, rather than in the browser.
Variants to test
These are the same ideas applied to other places, useful practice for a beginner.
- Invite an address you control, accept the invitation, and change the
emailin the activation body to another account. A positive result is a successful response and a login with the password you supplied. - Look for other endpoints that take an identifier in the body alongside a token, such as email change, member removal or role assignment, and swap the identifier for another user's. A positive result is the action being applied to the other user.
- Check whether the invitation token is bound to the invited address at all by replaying a token issued for one address against a different one. A positive result is acceptance rather than a rejection.
- Inspect endpoint names for mismatches like
reset-multi-user-passwordon an invitation flow, and test whether the reset and invite paths share tokens or state. A positive result is a token from one flow being accepted by the other.
Glossary
- Bug bounty programme: a company's public offer to reward people who report security problems responsibly.
- Google dork: a search query crafted to surface pages or sites that are not meant to be prominent.
- Organisation account: a shared company workspace that can hold several users.
- Invitation system: the feature that lets an existing member invite new people by email.
- Token: a long random string that acts as a temporary key, proving the holder is the person it was issued to.
- Business logic flaw: a weakness in the rules of an application rather than in its locks, caused by trusting input that should be checked.
- Traffic interceptor: a tool that sits between browser and website and lets you pause, read and edit messages; Burp Suite is one.
- Endpoint: a specific address on a server that performs one job.
- POST request: the kind of message a browser sends when submitting data, such as a filled-in form.
- Request body: the part of a request that carries the submitted data.
- Client-controlled input: a value that comes from the browser and can therefore be changed by the user before sending.
- Trust boundary: the line between what the server knows for certain and what it merely accepts from the user.
- Account takeover: logging in as somebody else and having full use of their account.
- Proof of concept: a short, repeatable set of steps that demonstrates a problem so defenders can reproduce it.
- Triaged: confirmed as valid and sorted for fixing.
- Root cause: the underlying reason the problem exists, as opposed to its visible symptom.
- Authorisation: the process of deciding whether a logged-in user is allowed to do a particular thing.
- Authorisation bypass: skipping or defeating that decision.
- Server side: a decision made on the server, where the user cannot edit it.
- State: information an application remembers between steps, such as which token belongs to which invitation.
- Replay: sending a previously captured request or token again to see whether it is still accepted.