Skip to content
Account takeover Disclosed report Beginner

Password not checked when disabling 2FA on HackerOne

The two-factor authentication disable flow on HackerOne accepted any password as long as a valid authentication or backup code was supplied. An attacker who already had a valid OTP or backup code could turn off 2FA without knowing the account password.

tester1231233 Follow

Originally disclosed on HackerOne

  • Triaged in 7 days
  • Fixed in 16 days
  • Paid in 9 days
  • Disclosed after 16 days

Hi,

when I was submitted a report to a program that request 2FA ON, I notice that if you try to disable this option will ask for backup code - password and if you enter a random password in the request filed and a correct backup code it will be successfully disabled the 2FA without check if the password was correct or not.

#PoC

  1. go to your account and activate the 2FA from /settings/auth
  2. after active this option click on Disabled icon beside Two-factor authentication.
  3. a new window will open asking for Authentication or backup code - Password to confirm the disabled.
Screenshot_2019-05-22_HackerOne.png
Screenshot_2019-05-22_HackerOne.png From the original on HackerOne
  1. in the first box enter a valid Authentication or backup code and in the password filed enter any random/wrong password and click save.
  2. the option will be disabled successful without check the validation of the password.

#graphql Request

JSON

{"query":"mutation Destroy_two_factor_authentication_credentials_mutation($input_0:DestroyTwoFactorAuthenticationCredentialsInput!,$first_1:Int!,$throttle_time_2:Int!,$first_4:Int!,$size_3:ProfilePictureSizes!) {destroyTwoFactorAuthenticationCredentials(input:$input_0) {clientMutationId,...F1,...F2}} fragment F0 on User {id,totp_supported,totp_enabled,remaining_otp_backup_code_count,account_recovery_phone_number,username,name,_profile_picturePkPpF:profile_picture(size:$size_3)} fragment F1 on DestroyTwoFactorAuthenticationCredentialsPayload {me {id,user_type,_program_health_acknowledgements2aGZgn:program_health_acknowledgements(first:$first_1,throttle_time:$throttle_time_2) {edges {node {id,reason,team_member {user {id},id,team {handle,name,sla_failed_count,id}}},cursor},pageInfo {hasNextPage,hasPreviousPage}},new_feature_notification {name,description,url,id},...F0}} fragment F2 on DestroyTwoFactorAuthenticationCredentialsPayload {me {totp_enabled,remaining_otp_backup_code_count,id},was_successful,_errors3exXYb:errors(first:$first_4) {edges {node {type,field,message,id},cursor},pageInfo {hasNextPage,hasPreviousPage}}}",
"variables":{"input_0":{"password":"██████████","otp_code":"███","clientMutationId":"9"},"first_1":1,"throttle_time_2":3600,"first_4":100,"size_3":"small"}}

Impact

user can disable Two-factor authentication without entering a valid password

The original report as published on HackerOne, by tester1231233. 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 GraphQL mutation that disables 2FA validated the OTP or backup code but never verified the supplied password against the account.

Impact

A user could disable two-factor authentication without entering a valid password, so anyone with a valid OTP or backup code could remove the account's second factor.

What the attacker needed

A valid OTP or backup code; access to the account settings

How it was found

  1. Enable two-factor authentication from the account settings page.
  2. Click the disable icon next to the two-factor authentication option.
  3. In the confirmation window, enter a valid authentication or backup code.
  4. Enter any random or wrong password in the password field and save.
  5. The two-factor authentication is disabled without the password being checked.

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.

Two-factor authentication (2FA) is a second lock on an account, usually a short code from an app. Normally, turning it off should require both the password and a valid code. Here the site only checked the code and ignored the password, so anyone holding a valid code could remove the extra protection.

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 HackerOne

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.