Skip to content
Account takeover Disclosed report Intermediate

Account deletion using the /v1/account/destroy API endpoint using account password without 2FA verification

The account destruction endpoint accepted a password-derived value without requiring an authorisation header or a second-factor check. An attacker who already knew a victim's password could therefore delete that user's account without passing 2FA.

erdy Follow

Originally disclosed on HackerOne

Bounty$1,000 Medium View original
  • Triaged in 6 days
  • Fixed in 8 months
  • Paid in 9 days
  • Disclosed after 8 months

Summary:

The account deletion endpoint at POST /v1/account/destroy does not check for 2FA and doesn't require an authorization header. Therefore, an unauthenticated attacker who knows the password of a user can delete their account without the need of 2FA.

Steps To Reproduce:

  1. Send a POST request to https://api-accounts.stage.mozaws.net/v1/account/destroy with the following body (do not include an Authorization header, if it is included and doesn't match the e-mail in the body, the request will fail):
{"email":"<email>","authPW":"<authPW>"}

The authPW can be calculated by the attacker since it is created client-side and the source code is publicly available.

Please refer to (Attachment on the original report: calculate_authpw.ts) to calculate the authPW.

Supporting Material/References:

An example of a successful account deletion:

Successful_AccountDeletion.png
Successful_AccountDeletion.png From the original on HackerOne

Impact

Summary:

An unauthenticated attacker can delete Firefox accounts of other users without needing 2FA, if the attacker knows their password.

The original report as published on HackerOne, by erdy. 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 destroy endpoint authenticated solely on the client-computed password-derived value and omitted both the session authorisation header and the second-factor requirement applied elsewhere.

Impact

An unauthenticated attacker who knows a user's password could delete that user's account without needing 2FA.

What the attacker needed

Attacker knows the victim's password; no account or session needed

How it was found

  1. Send a POST request to the account destroy endpoint with the victim's email and the computed password-derived value.
  2. Omit the authorisation header, since a mismatched one causes the request to fail.
  3. Compute the password-derived value using the publicly available client code.

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 log in, the server normally checks both your password and a second code from your phone. Here the endpoint that deletes an account only checked the password-derived value, so anyone holding the password could wipe the account without the second code. The password-derived value is computed in the browser, so its recipe is public.

What is Account takeover?

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

More from Mozilla

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.