Skip to content

Instantly share code, notes, and snippets.

@superboy-zjc
Last active March 16, 2025 20:54
Show Gist options
  • Select an option

  • Save superboy-zjc/8eedfce3c1eba1eaab3a8e4236a6a736 to your computer and use it in GitHub Desktop.

Select an option

Save superboy-zjc/8eedfce3c1eba1eaab3a8e4236a6a736 to your computer and use it in GitHub Desktop.

The Invitation Hell

Summary

We've identitied invitation functionality in the web app introduces a lot security concerns. This project aims at systematically investigating common vulnerabilties frequently happened and their unique impacts in the invitation functionality.

Break down

Why invitation functionality causes so many security vulnerabilities?

The app backend needs to manage the invitation token cross a long time (at least days), so we've seen token reuse frequently happens. And they wanna attract more users into the app, thus sometimes, they simply give invited users' privilege to bypass the email verification and even unverified email users can get invitation banner.

It is not easy to balance the user experience and security.

Case Study

Email Verification Bypass through Invitation

https://hackerone.com/reports/1040047

Wordpress had invitation functionality vulnerable to email verification bypass in the past. Any user who enters in the account registration process through an invitation link is able to claim any email address that does not belong to them without any verification.

https://hackerone.com/reports/2586433 The invitation code intended for email A can be used to register for email B.

Invitation Token leads to Account Takeover

The invitation functionality in this app sends the invited user with a link and token that can be used to reset any user's password.

https://infosecwriteups.com/business-logic-flaw-in-invitation-system-allows-to-takeover-any-account-at-private-company-daaf898966b0

Old enterprise version of github had invitation functionality vulnerable to account takeover. When an organization invite a user through email address A, the github account which is configured with email address A will be able to accept the invitation by viewing the organization's page. However, the invitation also works for accounts with unverified email address A. Thus, attackers can claim email address A into their account in a unverified state to sneak into the organization.

https://bounty.github.com/2017/11/08/organisation-takeover-maintainer-to-owner-privilege-escalation.html

Similar to the last one. As long as you can register on the app with an unverified email address and organization invitation still poped up for unverified email. You can potentially takeover any invited email address to that organization by registering one, thus sneaking into the organization.

Also, sometimes the invited user will automatically join the team as shown in the last two links in this section.

https://x.com/Jayesh25_/status/1726189011624989125 https://hackerone.com/reports/49566 https://x.com/Jayesh25_/status/1726189011624989125#:~:text=Nice%20one,the%20organisation%20anonymously.

Invitation API leads to Privilege Escalation

https://hackerone.com/reports/835005

If user A is invited into the organization, A will be able to abuse the invitation API to invite user B to the organization with adminstrator's role.

It's like normal user can invite anyone into the organization with admin role.

Invitation Code is Brute Forceable

https://infosecwriteups.com/500-for-cracking-invitation-code-for-unauthorized-access-account-takeover-558c663fb947

Invitation Code is Reusable

https://hackerone.com/reports/331691 https://hackerone.com/reports/46429 https://medium.com/@kshunya/invitation-hijacking-4d6467f418cc https://osintteam.blog/invitation-link-hijacking-on-a-bug-bounty-program-50d3b92d5532

Invitation code of some sensitive organization can be reused, which introduces security risks.

Email Content Manipulation through Invitation API, leading to phishing risks

https://hackerone.com/reports/56182

  • User can manipulate invitation email content
  • Invitation is still being sent to existing users

Invitation leads to Account Registration DOS

https://systemweakness.com/attacker-can-takeover-any-account-because-of-misconfiguration-of-invite-members-bug-bounty-95639f20156d

For some app, once invitation is initiated, the account will be created in the backend. The invited email owner will not able to register account with the invited email due to the existence. The only way is to click the invitation link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment