Skip to content
Account takeover Write-up Beginner

Twitter's OAuth has a gaping security hole

Twitter's OAuth tokens were not revoked when a user changed their password, so an attacker who had obtained the password and authorised an OAuth application could continue to access the account even after the password was changed. The author argues this is a security hole because users expect a password change to lock out intruders.

shkspr.mobi

Published on shkspr.mobi

Twitter has a gaping security hole. Changing your password won't stop malicious users logging in as you!

Terence Eden, on shkspr.mobi

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the design decision not to revoke OAuth tokens on password change, combined with a lack of user awareness that changing a password does not revoke existing tokens.

Impact

An attacker who has obtained a user's password and authorised an OAuth application could continue to access the account even after the password is changed, unless the user manually revokes the token.

What the attacker needed

Attacker knows the victim's password; attacker can authorise an OAuth application

How it was found

  1. Eve discovers Alice's password.
  2. Eve visits Bob's site and uses OAuth to authorise access to Alice's account.
  3. Alice changes her password.
  4. Because Bob's site uses OAuth, it does not require Alice or Eve to re-enter the password, so Eve retains access.

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

OAuth lets you log into a website using another service (like Twitter) without giving that website your password. The website gets a special key (token) instead. The problem was that changing your Twitter password did not cancel these keys, so someone who had stolen your password and used it to get a key could still use your account even after you changed the password.

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.

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.