Skip to content
CSRF Disclosed report Beginner

Account takeover by changing email

The email-change endpoint for unconfirmed accounts lacked CSRF protection, so an attacker could trick a new user into submitting a request that changed the account's email to the attacker's address. The attacker could then take over the unconfirmed account via password reset.

tomoh Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 2 hours
  • Fixed in 30 hours
  • Disclosed after 31 days

The endpoint /signup/email allows users to change their email before they confirm their account email. This endpoint is not protected from CSRF. Thus, any account that is not yet "confirmed" is vulnerable to account takeover using the following steps:

  1. Attacker obtains new email address not associated with a KA account.
  2. Attacker then lures a new KA user to visit a URL linking to a page that sends a POST request to /signup/email with the POST body : casing=camel&email=ATTACKER_EMAIL.
  3. The email change will go through and the attacker would then be able to take over the unconfirmed account using password reset.
  4. The original user would not be able to reclaim account since the original email is now not associated with any KA account.

Impact

Attackers would be able to takeover any unconfirmed account on Khan Academy. And since unconfirmed users can participate in most activities on the website, this could lead to leakage of personal info. Since this ATO does not require any knowledge of the user's email address or KAID, it would become possible to launch large scale attacks by posting malicious links on forums or other places on the internet that KA users would visit.

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the email-change endpoint accepted state-changing POST requests without a CSRF token or origin check.

Impact

Attackers could take over any unconfirmed account, potentially leaking personal information, and because no knowledge of the victim's email or ID is needed, large-scale attacks via malicious links were possible.

What the attacker needed

Victim has an unconfirmed account; victim visits attacker-controlled page; attacker has an email address

How it was found

  1. Attacker obtains a new email address not linked to any account.
  2. Attacker lures a new user to a page that sends a POST request to the email-change endpoint with the attacker's email.
  3. The email change succeeds, and the attacker resets the password to take over the unconfirmed account.
  4. The original user cannot reclaim the account because their email is no longer associated with it.

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 report has not been written yet. The Original tab links to the source.

When you sign up, a site may let you change your email before you confirm it. This endpoint accepted that change from any website, without checking the request came from the real site. An attacker could make a new user's browser send the change, pointing the account at the attacker's email, then reset the password and take the account.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by tomoh

View all

1 more disclosed report, best first.

More from Khan Academy

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.