Skip to content
CSRF Disclosed report Intermediate

CSRF on Periscope Web OAuth authorization endpoint

The OAuth authorization endpoint on Periscope Web accepted authorisation requests without a CSRF token or Origin validation. A malicious third-party application could silently obtain an authorization code and exchange it for an access token granting full API access to a victim's account.

File Descriptor Follow

Originally disclosed on HackerOne

  • Triaged in 5 days
  • Fixed in 22 days
  • Paid in 37 days
  • Disclosed after 4 months

Hi, I would like to report an issue in the OAuth authorization endpoint on Periscope Web. This allows a malicious 3rd party application to gain full API access to a victim's Periscope account.

#Details Periscope has developer APIs that allow a 3rd party application to access resources on behalf of a user. The authorizion page is like this https://www.periscope.tv/oauth?client_id=█████████&redirect_uri=https://getmevo.com/oauth/periscope

It was found that the authorize endpoint does not have any protection against CSRF. The request to authorize a 3rd party application to access one's Periscope account is as follows:

HTTP
POST https://www.periscope.tv/oauthAuthorize HTTP/1.1
Host: www.periscope.tv
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Cookie: sid=[...]

client_id=████&redirect_uri=https%3A%2F%2Fgetmevo.com%2Foauth%2Fperiscope?abc

As one can see, there is no CSRF token or Origin validation.

After a 3rd party application gets the authorization code from redirect_uri, it can then exchange it for an access token.

#Impact Since the Developer APIs are not public, I have no information what the APIs can perform. Based on the the description on the authorization page however, it looks intimidating that it has full access to an account.

periscope-fullaccess.PNG
periscope-fullaccess.PNG From the original on HackerOne

At minimum, I found endpoints that allow creating a broadcast (https://public-api.periscope.tv/v1/broadcast/create), tweeting it (https://public-api.periscope.tv/v1/broadcast/publish) and deleting a broadcast (https://public-api.periscope.tv/v1/broadcast/delete).

#PoC

  1. Make sure you are logged into Periscope Web (https://periscope.tv)
  2. Go to http://innerht.ml/pocs/periscope-oauth-csrf/
  3. You will be redirected to something like https://getmevo.com/oauth/periscope?code=abcde&state=, copy the code value in the parameter
  4. Go to http://innerht.ml/pocs/periscope-oauth-csrf/code.php?code=abcde and replace the above code in the parameter
  5. A tweet will be posted in your timeline with a broadcast

The behind the scene is:

  1. Exchange code for access_token (https://public-api.periscope.tv/v1/oauth/token)
  2. Create a broadcast (https://public-api.periscope.tv/v1/broadcast/create)
  3. Publish it (https://public-api.periscope.tv/v1/broadcast/publish)

Note that a real attack does not require user interaction. In this PoC the manual copying of code is because I don't have a 3rd party Periscope application.

#Fix Add CSRF protection

The original report as published on HackerOne, by filedescriptor. 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 authorisation endpoint processed the approval POST without a per-session anti-CSRF token or Origin/Referer check, so a cross-site request was indistinguishable from a genuine one.

Impact

The attacker's application could gain full API access to the victim's account, at minimum creating, publishing and deleting broadcasts; the reporter notes a real attack would not require user interaction.

What the attacker needed

Victim logged into Periscope Web; victim visits attacker page; attacker has a third-party Periscope application

The fix

The authorisation endpoint should be fixed by adding CSRF protection, such as an anti-CSRF token and Origin validation.

How it was found

  1. Log in to Periscope Web.
  2. Visit the attacker's proof-of-concept page, which submits the authorisation request.
  3. Get redirected to the redirect_uri with a code parameter and copy the code.
  4. Submit the code to the attacker's second page.
  5. A tweet with a broadcast is posted to the victim's timeline.

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 let another app use your account, the site should confirm that you really meant to approve it. Here the site accepted the approval request from any page, so a malicious site could quietly approve its own app against your logged-in account and then act as you.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by File Descriptor

View all

20 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.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.