Account Takeover in Periscope TV
The login endpoint built its OAuth redirect destination from the untrusted Host header, so a crafted host value made the redirect point at an attacker-controlled domain. An attacker could send the resulting authorise link to a victim and receive their OAuth token and verifier after authorisation, allowing account takeover.
- Triaged in 3 days
- Fixed in 11 days
- Paid in 5 days
- Disclosed after 7 months
Summary by the researcher
Another way to exploit host header poisoning
The report
Summary:
When you login periscope.tv using twitter, and change the host header from www.periscope.tv to attacker.com/www.periscope.tv, the oauth redirect destination will be attacker.com/www.periscope.tv, thus allowing attacker to send the oauth authorize link to victim, and takeover their account after auto redirect.
Steps To Reproduce:
Visit https://www.periscope.tv/ and click login with twitter, a request should appear
GET /i/twitter/login?csrf=████ HTTP/1.1
Host: www.periscope.tv
User-Agent: █████████
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://www.periscope.tv/
cookie: ...
Change the host header to
Host: hackerone.com/www.periscope.tv
Full request
GET /i/twitter/login?csrf=██████ HTTP/1.1
Host: hackerone.com/www.periscope.tv
User-Agent: █████████
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://www.periscope.tv/
cookie: ...
Response should be something like
<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;https://twitter.com/oauth/authenticate?oauth_token=████████"></head></html>
Send this link to victim, after authorizing, victim's twitter oauth token and verifier is sent to hackerone.com, attacker could now reuse the same token to takeover victim's account.
Vimeo: https://vimeo.com/256356501 password: ███████
Impact
Account Takeover for periscope.tv
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 application trusted the client-supplied Host header when constructing the OAuth redirect destination instead of using a fixed, configured callback URL.
Impact
An attacker could take over a victim's account by capturing their OAuth token and verifier, though the victim must first authorise the crafted link.
What the attacker needed
Victim clicks a crafted login link; victim authorises the Twitter prompt
How it was found
- Start the Twitter login flow on the site and capture the login request.
- Change the Host header to an attacker-controlled domain followed by the real host.
- Observe that the response redirects to Twitter's OAuth authenticate page.
- Send the resulting link to the victim and have them authorise.
- Receive the victim's OAuth token and verifier on the attacker domain and reuse them.
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 in with Twitter, the site sends you to Twitter and then back again. The site worked out the 'back again' address from a value in the request that the visitor controls, called the Host header. By changing that value, an attacker made the site send the victim's sign-in result to the attacker's own server, which is enough to take over the account.
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.