Skip to content
Account takeover Disclosed report Beginner

Bypass Password Authentication to Update the Password

The password-change screen on Twitter did not limit how many times an old password could be submitted, so someone holding a hijacked session could brute-force the current password and then set a new one. That would let them take over the account despite the extra password prompt meant to stop session hijackers.

a13h1 Follow

Originally disclosed on HackerOne

  • Paid in 16 days
  • Disclosed after 4 months

**Summary:**This additional security measure from twitter provides protection to the victim's account, considering that a victim's session may have been hijacked by a hacker, however, due to this additional layer of security Implemented by twitter the hacker would not be able to change the victim's Password, as they will be prompted to enter the victim's account password In order to make these changes, which will not be known to a hacker (In case of a session hijack)

This report is to bring to your attention a security vulnerability that will allow hackers that have hijacked a user's session to bypass the password screen (Without knowing the user's password)

Description: For users that have had their twitter session hijacked, this security vulnerability would enable a hacker to completely take over a victim's account as they will be able to change the victim's password by bypassing the old password by the umrestricted rate limit or bruteforcing in the password

Steps To Reproduce:

With the assumption that the victim's twitter session is 'hijacked' and in a 'logged in' state for the hacker. The below steps must be followed In order to reproduce the security vulnerability.

Security Vulnerability #1 - Update Victim's Password - Bypass old password by unrestricted rate limiting

1.Go to Settings and Privacy -> Accounts 2.Click on Email -> Password 3.Enter any random password and Click on 'Next' 4.Intercept the request the above request and send it to intruder 5.Then select the position old password 6.Then go in payload add password list 7.Then start the attack bcoz of no rate limit the password bruteforcing is continue and find the correct password and update the old one

Resolution: Apply the Rate Limitation

Supporting Material/References:

Impact

This a serious security vulnerability, as It could lead to a hacker completely taking over the user's account by overriding twitter's security protocol as they could use this technique to bypass the password and it use to fully takeover the victim password

The original report as published on HackerOne, by a13h1. 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. 4 min read.

Context

The target is X (then Twitter), on the *.twitter.com asset, and the feature in question is the account password change flow. Twitter adds an extra authentication step to that flow: before a password can be changed, the user is asked to re-enter the current account password. The stated purpose of that prompt is to protect a victim whose session may already have been hijacked, because a hijacker holding a live session would not know the account password and so should be stopped at that screen.

The report argues that this protection can be defeated. If the password prompt can be attacked by brute force without restriction, the hijacker can recover the current password and then set a new one, taking over the account completely.

Setup

The precondition is a hijacked session: the victim's Twitter session is assumed to be in a logged-in state in the attacker's hands. The attacker does not know the victim's password. The tooling named in the report is an intercepting proxy and its intruder feature, used to replay the password-change request with a list of candidate passwords.

No versions, endpoints, parameters or headers are given in the report.

Finding it

The researcher focused on the re-authentication prompt in the password change flow. The prompt exists precisely to stop someone who has a session but not the password, so the question was whether that prompt can be answered by guessing. The observation is that the request carrying the old password can be replayed repeatedly, and the report attributes this to an unrestricted rate limit, which makes brute forcing the password feasible. In the researcher's words, the vulnerability allows a hijacker to bypass the password screen without knowing the user's password.

Exploitation

The report gives a single reproduction path, labelled "Security Vulnerability #1 - Update Victim's Password - Bypass old password by unrestricted rate limiting".

Step 1: Open the account settings

Go to Settings and Privacy, then Accounts.

Step 2: Open the password change form

Click on Email, then Password.

Step 3: Submit a wrong password

Enter any random password and click on Next. This produces the request that carries the old password.

Step 4: Capture the request

Intercept the above request and send it to intruder.

Step 5: Mark the password position

Select the position of the old password in the request so that the intruder substitutes values there.

Step 6: Load a password list

Go into payload and add a password list.

Step 7: Run the attack

Start the attack. Because there is no rate limit, the password brute forcing continues, the correct password is found, and the old password can then be updated.

The report does not include the captured request, the response, the payload list or any result output, so the exact wire format of the password check is not documented here.

Root cause

The design intent is sound: the current password guards a sensitive change even when the session is compromised. The failure is that the check on that password can be attempted an unlimited number of times. The report's resolution line names the missing control directly: apply rate limitation. Because the endpoint accepts repeated guesses, the knowledge factor collapses into something an attacker can enumerate with a word list, and the extra layer of security provides no protection against a session hijacker.

Impact

Under the stated condition, a hijacked but logged-in session, an attacker can recover the victim's password by brute force and then change it. The report describes this as a complete takeover of the victim's account, overriding Twitter's security protocol and allowing the attacker to fully take over the victim's password. The impact depends on the session first being hijacked; the report does not discuss how that hijack would occur.

Fix

The report's recommended fix is to apply rate limitation to the password check so that repeated guesses are throttled. The report does not state what the program actually changed.

Variants to test

  • Other re-authentication prompts in the same product: any screen that asks for the current password before a sensitive action (email change, disabling protections, deleting the account). A positive result is that a wrong password can be submitted repeatedly without lockout, delay or challenge.
  • The same password check reached from a different client or path, for example a mobile or API route for the same action. A positive result is that the throttle present on the web form is absent on the alternate route.
  • Throttle evasion by varying client-controlled values such as source address or session, where the target's limiting is keyed on something the attacker can rotate. A positive result is that guesses continue past the limit that stops a single fixed client.

Hunting notes

This class of bug hides in the gap between a security control and its enforcement: the prompt exists, but the server behind it does not count failures. During recon, look for any flow that asks for a password again after login, then test whether wrong answers are counted, delayed or locked out. The report ties the missing limit to a stated precondition, a hijacked session, and walks the path from settings to the password check.

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. 9 min read.

What happened, in plain words

Twitter (now X) has a screen where you can change your account password. Before it lets you set a new password, it asks you to type your current one. That extra question is there on purpose: if someone has stolen your logged-in session, they still should not be able to change your password, because they do not know it.

The researcher found that this question can be answered by guessing, over and over, with no limit. A person who has stolen a session can send a long list of candidate passwords to that screen, one after another, until the right one comes back. Once they know the current password, they can set a new one and lock the real owner out.

The report calls this "Bypass Password Authentication to Update the Password". It was filed against the *.twitter.com asset, rated high severity, and disclosed on 11 January 2021.

A few ideas first, because the rest of the article leans on them:

  • Session: after you log in, the site gives your browser a small piece of data (often called a cookie) that says "this browser is already logged in as this user". Your browser sends it with every request, so you do not have to type your password on every page. If someone else gets hold of that piece of data, their browser can pretend to be yours. That is a session hijack.
  • Re-authentication: asking you to prove who you are again, usually by retyping your password, right before a sensitive action. It is a second check even though you are already logged in.
  • Brute force: trying many guesses automatically until one works, like working through every key on a keyring instead of reasoning about which one fits.
  • Rate limit: a cap on how often something can be tried in a period of time. A cash machine that swallows your card after three wrong PINs is a rate limit in the physical world.
  • Intercepting proxy: a tool that sits between your browser and the website and lets you pause, look at and change requests before they are sent. Intruder is the part of such a tool that resends one request many times with different values in one chosen spot.

Context

The target is X, then Twitter, on the *.twitter.com asset. The feature is the account password change flow. Twitter adds an extra authentication step to that flow: before a password can be changed, the user is asked to re-enter the current account password. The stated purpose of that prompt is to protect a victim whose session may already have been hijacked, because a hijacker holding a live session would not know the account password and so should be stopped at that screen.

The report argues that this protection can be defeated. If the password prompt can be attacked by brute force without restriction, the hijacker can recover the current password and then set a new one, taking over the account completely.

Setup

The precondition is a hijacked session: the victim's Twitter session is assumed to be in a logged-in state in the attacker's hands. The attacker does not know the victim's password. The tooling named in the report is an intercepting proxy and its intruder feature, used to replay the password-change request with a list of candidate passwords.

No versions, endpoints, parameters or headers are given in the report.

Finding it

The researcher focused on the re-authentication prompt in the password change flow. The prompt exists precisely to stop someone who has a session but not the password, so the question was whether that prompt can be answered by guessing. The observation is that the request carrying the old password can be replayed repeatedly, and the report attributes this to an unrestricted rate limit, which makes brute forcing the password feasible. In the researcher's words, the vulnerability allows a hijacker to bypass the password screen without knowing the user's password.

Exploitation

The report gives a single reproduction path, labelled "Security Vulnerability #1 - Update Victim's Password - Bypass old password by unrestricted rate limiting".

Step 1: Open the account settings

Go to Settings and Privacy, then Accounts.

This is just navigation inside the product, done with the hijacked session already loaded in the browser. The attacker is walking to the place where the password can be changed, the same way the real owner would.

Step 2: Open the password change form

Click on Email, then Password.

Still navigation. The point of these two steps is to reach the form that will ask for the current password, because that form is what produces the request the attack depends on.

Step 3: Submit a wrong password

Enter any random password and click on Next. This produces the request that carries the old password.

Why a wrong one on purpose? Because the goal at this stage is not to succeed but to make the browser send one real example of the password-check request. A random value guarantees the check fails, which is fine: the attacker now has a genuine request to copy and replay.

Step 4: Capture the request

Intercept the above request and send it to intruder.

With the proxy switched on, the request from step 3 is paused on its way out. Sending it to the intruder tool means it is now stored as a template that can be resent many times with one part swapped out.

Step 5: Mark the password position

Select the position of the old password in the request so that the intruder substitutes values there.

A request is a block of text. Somewhere in it is the field holding the password that was typed. Marking that spot tells the tool: leave everything else exactly as it is, and put a different value here on each attempt. Everything else staying the same is what makes the attempts comparable.

Step 6: Load a password list

Go into payload and add a password list.

The payload is the set of values to try. A password list is a file of common or likely passwords, one per line. The tool will work through it, one entry per request.

Step 7: Run the attack

Start the attack. Because there is no rate limit, the password brute forcing continues, the correct password is found, and the old password can then be updated.

Normally a site slows you down here: after a few wrong answers it waits, blocks, or asks for something extra. The report says none of that happens, so the tool can keep going through the whole list. When one of the guesses is the real password, the attacker now holds the current password and can set a new one.

The report does not include the captured request, the response, the payload list or any result output, so the exact wire format of the password check is not documented here.

Root cause

The design intent is sound: the current password guards a sensitive change even when the session is compromised. The failure is that the check on that password can be attempted an unlimited number of times. The report's resolution line names the missing control directly: apply rate limitation. Because the endpoint accepts repeated guesses, the knowledge factor collapses into something an attacker can enumerate with a word list, and the extra layer of security provides no protection against a session hijacker.

Think of a door with a keypad that never locks, never beeps and never slows down. The keypad looks like security, but if you can press buttons as fast as you like for as long as you like, it is only a matter of time.

Impact

Under the stated condition, a hijacked but logged-in session, an attacker can recover the victim's password by brute force and then change it. The report describes this as a complete takeover of the victim's account, overriding Twitter's security protocol and allowing the attacker to fully take over the victim's password. The impact depends on the session first being hijacked; the report does not discuss how that hijack would occur.

Fix

The report's recommended fix is to apply rate limitation to the password check so that repeated guesses are throttled. The report does not state what the program actually changed.

Variants to test

  • Other re-authentication prompts in the same product: any screen that asks for the current password before a sensitive action (email change, disabling protections, deleting the account). A positive result is that a wrong password can be submitted repeatedly without lockout, delay or challenge.
  • The same password check reached from a different client or path, for example a mobile or API route for the same action. A positive result is that the throttle present on the web form is absent on the alternate route.
  • Throttle evasion by varying client-controlled values such as source address or session, where the target's limiting is keyed on something the attacker can rotate. A positive result is that guesses continue past the limit that stops a single fixed client.

Hunting notes

This class of bug hides in the gap between a security control and its enforcement: the prompt exists, but the server behind it does not count failures. During recon, look for any flow that asks for a password again after login, then test whether wrong answers are counted, delayed or locked out. The report ties the missing limit to a stated precondition, a hijacked session, and walks the path from settings to the password check.

Glossary

  • Session: the state of being logged in, represented by data your browser holds and sends with each request so you do not retype your password on every page.
  • Session hijack: someone else obtaining your session data and using it to act as you without knowing your password.
  • Cookie: a small piece of data a site stores in your browser and gets back on later requests; often used to carry the session.
  • Re-authentication: asking you to prove your identity again, usually with your password, just before a sensitive action.
  • Authentication: the process of proving who you are, for example with a password.
  • Brute force: trying many guesses automatically until one is correct.
  • Password list: a file of candidate passwords, one per line, used as guesses.
  • Rate limit: a cap on how many times an action can be attempted in a given period.
  • Throttle: to deliberately slow down or limit repeated attempts.
  • Lockout: blocking further attempts after too many failures.
  • Intercepting proxy: a tool placed between browser and website that can pause, inspect and modify requests.
  • Intruder: the feature of such a tool that resends one request many times, substituting a different value in a chosen position each time.
  • Request: the message your browser sends to a server asking it to do something.
  • Response: the message the server sends back.
  • Payload: in this context, the set of values fed into the marked position, one per attempt.
  • Endpoint: the specific address on a server that a request is sent to.
  • API: a way for software to talk to a service directly, without the normal web page in between.
  • Asset: the part of a company's systems that a bug bounty report concerns, here *.twitter.com.
  • Severity: a rating of how serious a vulnerability is; this report is rated high.
  • Root cause: the underlying reason a vulnerability exists, as opposed to its visible symptom.
  • Recon: the exploratory phase of looking around a target to find places worth testing.

More by a13h1

View all

8 more disclosed reports, best first.

More from X / xAI

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.