Skip to content
Account takeover Disclosed report Intermediate

Invalid

The platform failed to verify ownership of an email address when linking a GitHub OAuth identity, allowing an attacker to set a victim's email on their own account. The attacker could then retain persistent access to the victim's account even after the victim verified the email or changed their password.

pashaaaaaaaa Follow

Originally disclosed on HackerOne

  • Disclosed after 15 hours

Summary: While testing the OAuth implementation on your platform, I discovered a critical vulnerability that allows a malicious attacker to take over any victim’s account and maintain persistent access even if the victim later verifies their email or changes their password. This issue arises because the application does not properly validate and enforce ownership of email addresses when accounts are linked via GitHub OAuth and subsequently changed to a victim’s email. As a result, the attacker effectively “controls both sides of the victim’s account lifecycle.

Steps to Reproduce: The attacker signs up on the platform using their GitHub OAuth account.

After registration, the attacker goes to account settings and changes their email address to the victim’s email address.

If the victim already exists: the attacker can trick them into re-verifying.

If the victim does not exist: the attacker can still set the victim’s email.

The victim receives a verification email and, believing it is legitimate, verifies it. At this point, the victim assumes ownership of the account.

However, when the attacker logs in again using GitHub OAuth, they are still logged into the victim’s account.

This results in persistent access for the attacker, even after the victim sets a password or makes account changes.

During further testing, I discovered that if the victim removes the backup email from account settings and then attacker logs in again with GitHub OAuth, they are once again logged directly into the victim’s account — and the backup email is automatically re-added without validation. This behavior further strengthens the persistence of the attack and demonstrates that the system is automatically restoring the attacker’s identity link, making it even harder for the victim to break free from the takeover.

Severity (CVSS v3.1):

Attack Vector (AV): Network

Attack Complexity (AC): Low

Privileges Required (PR): None

User Interaction (UI): None

Scope (S): Unchanged

Confidentiality (C): High

Integrity (I): High

Availability (A): High

CVSS Base Score: 9.8 (Critical)

Recommendation: Enforce strict email ownership verification before binding an external OAuth identity (e.g., GitHub).

Prevent attackers from changing an account’s email to an email that already exists in the system.

Ensure that OAuth logins are tied to verified identities, not just email strings, to avoid collisions.

Impact

Full Account Takeover (ATO): The attacker gains complete access to the victim’s account.

Confidentiality: The attacker can view all sensitive information of the victim.

Integrity: The attacker can modify or delete the victim’s data.

Availability: The attacker can lock the victim out of their own account, effectively causing denial of service.

This vulnerability allows a complete compromise of any account and could severely impact users’ trust and data security.

The original report as published on HackerOne, by pashaaaaaaaa. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

WakaTime is the target of this report, and the asset named is wakatime.com. The feature under examination is the platform's OAuth account linking, specifically the flow that lets a user register and sign in with a GitHub OAuth identity, combined with the account settings page where a user can change the email address associated with their account.

Normally, an OAuth login should bind an external identity (here, a GitHub account) to a platform account whose email address has been proven to belong to the person operating that GitHub account. The email address is the string that ties the two identities together, so the platform has to be sure that whoever controls the GitHub identity also controls the email address, and vice versa. The report argues that this ownership check was missing, which lets one person's GitHub identity end up attached to another person's account.

Setup

The researcher needed only an attacker-controlled GitHub account and the ability to register on WakaTime through GitHub OAuth. No special role, paid plan or privileged position is described. The victim is any user whose email address the attacker knows, and the report distinguishes two cases: a victim who already has an account, and a victim who does not yet have one. The report does not name any tools, browser versions or platform versions.

Finding it

While testing the OAuth implementation, the researcher noticed that the application did not properly validate and enforce ownership of email addresses when an account created through GitHub OAuth had its email changed to a victim's address. The concern was that the platform treated the email string as the link between the OAuth identity and the account, without checking that the person setting that email actually owned it. That is what made the flow look wrong: the attacker controls the GitHub side, and by writing the victim's email into the account the attacker also controls the email side, so the attacker ends up holding both halves of the account's identity.

Exploitation

Step 1: register with GitHub OAuth

The attacker signs up on the platform using their own GitHub OAuth account. This creates a WakaTime account whose identity is, at this point, entirely under the attacker's control.

Step 2: change the account email to the victim's address

After registration, the attacker opens account settings and changes the email address to the victim's email address. The report describes two situations here:

  1. If the victim already exists, the attacker can trick them into re-verifying.
  2. If the victim does not exist, the attacker can still set the victim's email.

In both cases the platform accepts the change without establishing that the attacker owns the address.

Step 3: the victim verifies the address

The victim receives a verification email and, believing it to be legitimate, verifies it. At that point the victim assumes ownership of the account. From the victim's perspective the flow looks like a normal sign-up or email confirmation.

Step 4: the attacker logs in again with GitHub OAuth

When the attacker logs in again using GitHub OAuth, they are still logged into the victim's account. The victim's verification did not sever the link between the attacker's GitHub identity and the account, so the attacker keeps access even after the victim sets a password or makes other account changes.

Step 5: removing the backup email does not help

During further testing the researcher found that if the victim removes the backup email from account settings and the attacker then logs in again with GitHub OAuth, the attacker is once again logged directly into the victim's account, and the backup email is automatically re-added without validation. The report describes this as the system automatically restoring the attacker's identity link, which makes the persistence of the takeover stronger and makes it harder for the victim to break free.

Root cause

The report attributes the issue to the application failing to validate and enforce ownership of email addresses when accounts are linked through GitHub OAuth and the email is subsequently changed to a victim's address. In design terms, the OAuth login is tied to the email string rather than to a verified identity: the platform lets an account's email be set to an address that already exists in the system, and it does not require proof of ownership before binding the external OAuth identity. Because the GitHub identity remains attached to the account, a later OAuth login re-establishes the session on that account, and the backup email is restored automatically without validation.

The report's recommendation section implies the missing controls: strict email ownership verification before binding an external OAuth identity, refusal to change an account's email to one that already exists in the system, and tying OAuth logins to verified identities rather than email strings to avoid collisions. The report does not include the underlying code, so the exact implementation mistake is not shown; the description above is the design-level failure the researcher describes.

Impact

The researcher describes the impact as full account takeover. Under the report's own framing, an attacker gains complete access to the victim's account, can view all of the victim's sensitive information (confidentiality), can modify or delete the victim's data (integrity), and can lock the victim out of their own account, causing a denial of service (availability). The report states that this allows a complete compromise of any account and could severely impact users' trust and data security.

The report's CVSS v3.1 vector is given as: Attack Vector Network, Attack Complexity Low, Privileges Required None, User Interaction None, Scope Unchanged, Confidentiality High, Integrity High, Availability High, with a base score of 9.8 (Critical). Note that the platform metadata records the severity as low, which differs from the researcher's own scoring; the report itself does not reconcile the two. The report's flow has the victim receive and verify a verification email, and notes that if the victim does not exist the attacker can still set the victim's email.

Fix

The report does not state what was changed. Its recommendation is to enforce strict email ownership verification before binding an external OAuth identity such as GitHub, to prevent attackers from changing an account's email to an email that already exists in the system, and to ensure that OAuth logins are tied to verified identities rather than just email strings, to avoid collisions.

Variants to test

  1. OAuth linking with an unverified email. On another target, register with a provider identity, then change the account email to an address you do not control. A positive result is that the platform accepts the change and a later OAuth login lands on the account associated with that address.
  2. Duplicate email acceptance. Try setting an account email to an address that already belongs to another account. A positive result is that the change is accepted rather than rejected as a collision.
  3. Persistence after victim remediation. After the victim verifies the address, changes the password, or removes the backup email, log in again with the OAuth identity. A positive result is that the attacker is still signed into the victim's account and any removed backup email is re-added without validation.
  4. Pre-registration takeover. Set the victim's email on an attacker account before the victim has registered. A positive result is that the victim's later registration or verification attaches to the attacker-controlled identity.
  5. Other providers. Repeat the flow with providers other than GitHub where the target supports them. A positive result is the same identity collision through a different OAuth provider.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

WakaTime is a service that tracks how much time you spend coding. You create an account on wakatime.com, and you can sign in either with an email address and password, or by letting GitHub vouch for who you are. That second option is called OAuth: instead of typing a password into WakaTime, you click a button, GitHub confirms your identity, and WakaTime trusts that confirmation.

When a site lets you sign in with GitHub, it has to connect two things: your GitHub identity and your WakaTime account. The glue between them is usually your email address. The site has to be sure that whoever controls the GitHub identity also controls the email address before attaching the login to an account.

The researcher found that WakaTime did not check this properly. Someone could create an account through GitHub, then simply type a victim's email address into the account settings. The site accepted it without proving the person actually owned that address. From there, the attacker's GitHub login stayed glued to the victim's account, and the victim could not shake it off, not even by verifying the email, changing the password, or removing the backup email. The report calls this a full account takeover.

The product and the feature

WakaTime is the target, and the asset named in the report is wakatime.com. The feature under examination is the platform's OAuth account linking. In plain terms, that is the flow that lets a user register and sign in with a GitHub OAuth identity, combined with the account settings page where a user can change the email address associated with their account.

Two ideas need unpacking before the rest makes sense.

OAuth is a way for one website to ask another website, "can you confirm who this person is?" You have seen it as the "Sign in with Google" or "Sign in with GitHub" buttons. You never give WakaTime your GitHub password. GitHub hands WakaTime a confirmation, and WakaTime creates or finds an account for you. Think of it like a friend vouching for you at a club door: the bouncer does not know you, but he trusts your friend.

Account linking is the part where the site decides which account on its own side belongs to the person GitHub just vouched for. If that decision is made badly, two different people can end up sharing one account.

Normally, an OAuth login should bind an external identity (here, a GitHub account) to a platform account whose email address has been proven to belong to the person operating that GitHub account. The email address is the string that ties the two identities together, so the platform has to be sure that whoever controls the GitHub identity also controls the email address, and vice versa. The report argues that this ownership check was missing, which lets one person's GitHub identity end up attached to another person's account.

Setting up

The researcher needed only an attacker-controlled GitHub account and the ability to register on WakaTime through GitHub OAuth. No special role, paid plan or privileged position is described. The victim is any user whose email address the attacker knows, and the report distinguishes two cases: a victim who already has an account, and a victim who does not yet have one. The report does not name any tools, browser versions or platform versions.

In everyday terms: you need a GitHub account of your own and the email address of the person you want to target.

Finding it

While testing the OAuth implementation, the researcher noticed that the application did not properly validate and enforce ownership of email addresses when an account created through GitHub OAuth had its email changed to a victim's address. The concern was that the platform treated the email string as the link between the OAuth identity and the account, without checking that the person setting that email actually owned it.

That is what made the flow look wrong: the attacker controls the GitHub side, and by writing the victim's email into the account the attacker also controls the email side, so the attacker ends up holding both halves of the account's identity. Picture a coat check that gives you a ticket with someone else's name written on it: you still hold the ticket, so you can come back for the coat whenever you like.

Exploitation

Step 1: register with GitHub OAuth

The attacker signs up on the platform using their own GitHub OAuth account. This creates a WakaTime account whose identity is, at this point, entirely under the attacker's control.

Why this step: the attacker needs a foothold, a real account they can log into. Using GitHub means the login is tied to an identity the attacker genuinely owns, which is exactly the half of the link they will later abuse.

Step 2: change the account email to the victim's address

After registration, the attacker opens account settings and changes the email address to the victim's email address. The report describes two situations here:

  1. If the victim already exists, the attacker can trick them into re-verifying.
  2. If the victim does not exist, the attacker can still set the victim's email.

In both cases the platform accepts the change without establishing that the attacker owns the address.

Why this step: the email address is the glue. By writing the victim's address into an account the attacker already controls through GitHub, the attacker makes the account look, from the email side, like it belongs to the victim.

Step 3: the victim verifies the address

The victim receives a verification email and, believing it to be legitimate, verifies it. At that point the victim assumes ownership of the account. From the victim's perspective the flow looks like a normal sign-up or email confirmation.

A verification email is the standard "click this link to prove the address is yours" message. The problem is that the message arrives because the attacker triggered it, and the victim has no way to tell that the account behind it was created by someone else. Why this step matters: the victim's click is what makes the account genuinely theirs in the system's eyes, and yet it does not remove the attacker's GitHub link.

Step 4: the attacker logs in again with GitHub OAuth

When the attacker logs in again using GitHub OAuth, they are still logged into the victim's account. The victim's verification did not sever the link between the attacker's GitHub identity and the account, so the attacker keeps access even after the victim sets a password or makes other account changes.

Why this is the core of the bug: the site remembers the GitHub identity as an owner of the account. Verification added the victim as an owner too, but it never removed the attacker. Two people now hold keys to the same door.

Step 5: removing the backup email does not help

During further testing the researcher found that if the victim removes the backup email from account settings and the attacker then logs in again with GitHub OAuth, the attacker is once again logged directly into the victim's account, and the backup email is automatically re-added without validation. The report describes this as the system automatically restoring the attacker's identity link, which makes the persistence of the takeover stronger and makes it harder for the victim to break free.

A backup email is a second address the site can use to reach you or to recover your account. The victim's attempt to cut the link by deleting it fails, because the next GitHub login re-adds it without validation. Think of a spare key that reappears on the hook every time the intruder walks past the door.

Root cause

The report attributes the issue to the application failing to validate and enforce ownership of email addresses when accounts are linked through GitHub OAuth and the email is subsequently changed to a victim's address. In design terms, the OAuth login is tied to the email string rather than to a verified identity: the platform lets an account's email be set to an address that already exists in the system, and it does not require proof of ownership before binding the external OAuth identity. Because the GitHub identity remains attached to the account, a later OAuth login re-establishes the session on that account, and the backup email is restored automatically without validation.

The report's recommendation section implies the missing controls: strict email ownership verification before binding an external OAuth identity, refusal to change an account's email to one that already exists in the system, and tying OAuth logins to verified identities rather than email strings to avoid collisions. The report does not include the underlying code, so the exact implementation mistake is not shown; the description above is the design-level failure the researcher describes.

Impact

The researcher describes the impact as full account takeover. Under the report's own framing, an attacker gains complete access to the victim's account, can view all of the victim's sensitive information (confidentiality), can modify or delete the victim's data (integrity), and can lock the victim out of their own account, causing a denial of service (availability). The report states that this allows a complete compromise of any account and could severely impact users' trust and data security.

Those three words come up constantly in security, so here is the plain version. Confidentiality means keeping secrets secret: the attacker can read what should be private. Integrity means data stays correct and untouched: the attacker can change or delete it. Availability means the service works for the people entitled to use it: the attacker can shut the real owner out.

The report's CVSS v3.1 vector is given as: Attack Vector Network, Attack Complexity Low, Privileges Required None, User Interaction None, Scope Unchanged, Confidentiality High, Integrity High, Availability High, with a base score of 9.8 (Critical). CVSS is a scoring system that turns the characteristics of a bug into a number, so different bugs can be compared. Note that the platform metadata records the severity as low, which differs from the researcher's own scoring; the report itself does not reconcile the two. The report's flow has the victim receive and verify a verification email, and notes that if the victim does not exist the attacker can still set the victim's email.

Fix

The report does not state what was changed. Its recommendation is to enforce strict email ownership verification before binding an external OAuth identity such as GitHub, to prevent attackers from changing an account's email to an email that already exists in the system, and to ensure that OAuth logins are tied to verified identities rather than just email strings, to avoid collisions.

In plain words: prove the address belongs to the person before you glue a GitHub login to it, refuse to reuse an address that another account already holds, and remember people by a verified identity rather than by a text string that anyone can type.

Variants to test

These are the same ideas applied to other sites, written so a beginner can follow them.

  1. OAuth linking with an unverified email. On another target, register with a provider identity, then change the account email to an address you do not control. A positive result is that the platform accepts the change and a later OAuth login lands on the account associated with that address.
  2. Duplicate email acceptance. Try setting an account email to an address that already belongs to another account. A positive result is that the change is accepted rather than rejected as a collision.
  3. Persistence after victim remediation. After the victim verifies the address, changes the password, or removes the backup email, log in again with the OAuth identity. A positive result is that the attacker is still signed into the victim's account and any removed backup email is re-added without validation.
  4. Pre-registration takeover. Set the victim's email on an attacker account before the victim has registered. A positive result is that the victim's later registration or verification attaches to the attacker-controlled identity.
  5. Other providers. Repeat the flow with providers other than GitHub where the target supports them. A positive result is the same identity collision through a different OAuth provider.

Glossary

  • OAuth: a way for one website to ask another website to confirm who you are, so you can sign in without sharing a password with the first site.
  • OAuth identity: the account at the other provider (here, GitHub) that is doing the vouching.
  • Account linking: the process of connecting an external login, such as GitHub, to an account on the site you are using.
  • Email ownership verification: proving that the person setting an email address actually controls it, usually by clicking a link sent to that address.
  • Verification email: the message containing that link, sent to confirm an address belongs to you.
  • Backup email: a second email address stored on an account, used for contact or recovery.
  • Account takeover (ATO): when someone else gains control of your account and can act as you.
  • Confidentiality: keeping data secret so only authorised people can read it.
  • Integrity: keeping data correct and unmodified by unauthorised people.
  • Availability: keeping a service usable for the people entitled to use it.
  • Denial of service: making a service or account unusable for its rightful owner.
  • CVSS: a scoring system that rates the severity of a security bug from its characteristics.
  • Attack Vector: in CVSS, how the attacker reaches the target, for example over the network.
  • Attack Complexity: in CVSS, how hard the attack is to carry out.
  • Privileges Required: in CVSS, what level of access the attacker needs before starting.
  • User Interaction: in CVSS, whether the victim has to do something, such as click a link.
  • Scope: in CVSS, whether the bug affects only the vulnerable component or spreads beyond it.
  • Base score: the single number CVSS produces from those characteristics.
  • Severity: a label such as low, medium, high or critical that summarises how serious a bug is.
  • Root cause: the underlying design or coding mistake that makes the bug possible.
  • Persistence: the attacker's ability to keep access even after the victim tries to remove it.
  • Collision: two different accounts or identities ending up mapped to the same value, such as the same email address.
  • Session: the state of being logged in, which the site remembers between page loads.

More from WakaTime

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.