Periscope iOS app CSRF in follow action due to deeplink
The Periscope iOS app accepted a custom URL scheme that triggered a follow action without any user confirmation. An attacker could craft a link or QR code that, when opened on a victim's device, made them follow an arbitrary account.
- Triaged in 39 hours
- Fixed in 28 days
- Paid in 13 days
- Disclosed after 35 days
Summary
This issue is mainly in the Periscope iOS app against CSRF follow action using deeplink.
as the report #583987 the CSRF work on iOS app
POC 1
QR code to follow periscope profile
pscp://user/periscopeco/follow
███████
POC2 by kunal94
<!DOCTYPE html>
<html>
<a href="pscp://user/<any user-id>/follow">CSRF DEMO</a>
</html>
video █████████
Impact
CSRF Follow against any user in periscope iOS app
What the report shows
The target is the Periscope iOS app, with the asset listed as *.pscp.tv. The weakness is cross-site request forgery (CSRF), and the specific action under attack is following a user. The researcher's summary states that the issue is mainly in the Periscope iOS app and that it allows a CSRF follow action using a deeplink. The report also references an earlier report, #583987, as evidence that CSRF works on the iOS app.
The first proof of concept is a QR code that, when scanned, follows a Periscope profile. The deeplink behind it is:
pscp://user/periscopeco/follow
The second proof of concept, credited to kunal94, is an HTML page containing a link to the same kind of deeplink, with the user ID left as a placeholder:
<!DOCTYPE html>
<html>
<a href="pscp://user/<any user-id>/follow">CSRF DEMO</a>
</html>
The report includes a video of the demonstration, but the text does not describe what it shows beyond the payloads above.
The stated impact is a CSRF follow against any user in the Periscope iOS app. The report was rated low severity and a bounty of 2,940.00 USD was awarded. It was disclosed on 2020-03-31. The text does not describe a fix.
Root cause
The report shows that a deeplink of the form pscp://user/<user-id>/follow performs a follow action, and that it can be triggered from a QR code or a web page. Because the deeplink can be triggered from outside the app, for example from a QR code or a link on a web page, an attacker can cause a follow without the user's intent. The report does not go into the app-side implementation.
Impact
An attacker could make a victim's Periscope account follow an arbitrary user. The report frames this as CSRF follow against any user in the iOS app. The report was rated low severity. The report does not claim any further consequence, such as access to private content or account takeover.
How this kind of bug works
CSRF abuses the fact that a browser or app attaches the user's ambient authority, such as cookies or a logged-in session, to requests automatically. If an endpoint performs a state-changing action and cannot tell whether the request was initiated by the user or by a third party, an attacker can host a page or craft a link that triggers the action when the victim visits it.
Mobile apps add a second surface: custom URL schemes. When an app registers a scheme such as pscp://, any web page, QR code, or other app can open a URL in that scheme. If the handler performs a sensitive action directly, without asking the user to confirm, the same CSRF logic applies. The attack does not need cookies in the browser sense; the app's own authenticated state is the ambient authority.
Defences fall into two groups. For web endpoints, the standard controls are anti-CSRF tokens tied to the session, SameSite cookie attributes, checking the Origin or Referer header, and requiring re-authentication for sensitive actions. For deeplinks, the app should treat incoming URLs as untrusted input: sensitive actions should require an explicit in-app confirmation, and the app should validate the URL structure and any parameters before acting on them.
How to test for it
- Enumerate the app's custom URL schemes and the deeplink paths it handles. On iOS, scheme registration is visible in the app's
Info.plist; on Android, in the manifest's intent filters. Look for paths that map to state-changing actions such as follow, like, subscribe, delete, or purchase. - For each candidate, build a URL that triggers the action and deliver it from outside the app: a link on a web page the victim visits, a QR code, or another app. Observe whether the action completes without any confirmation prompt.
- Test whether the action requires the victim to be logged in and whether it uses the existing session. A positive result is a state change on the victim's account caused solely by opening the link, with no user interaction beyond following it.
- Repeat with a fresh session and with the app in the background to rule out cached state.
Common false positives: the app shows a confirmation dialog before acting (that is the intended defence, not a bug); the deeplink only opens a profile page without performing the action; the action requires the user to tap a button inside the app after the deeplink opens; or the deeplink is only reachable from within the app itself, so no external attacker can trigger it. Also check whether the action is idempotent and harmless, such as opening a screen, which is not a security issue.
How it is fixed
For deeplink-driven actions, require an explicit confirmation inside the app before performing any state-changing operation, and validate the URL's structure and parameters. Where the action is also exposed over HTTP, apply the standard CSRF defences: per-session anti-CSRF tokens, SameSite cookies, and Origin/Referer validation. Sensitive actions can additionally require re-authentication. The report does not describe which of these was applied.
Hunting notes
Deeplink CSRF tends to hide in apps with rich custom schemes: social apps with follow, like, and share actions; commerce apps with cart and checkout deeplinks; and apps that support universal links or app links alongside custom schemes. Recon signals include a registered scheme in the app manifest, documentation or blog posts describing deeplinks, and QR codes used for onboarding or sharing. When you find a candidate, demonstrate the full chain from an external trigger to the state change, and show the before and after state of the victim's account. A clear, reproducible video and a minimal payload make the impact easy for a triager to accept; keep the scope to the action you can actually trigger.
What happened, in plain words
The program is listed as X / xAI. Like most mobile apps, it could be opened from outside by special links. A link that starts with a made-up prefix instead of http is called a deeplink: the phone sees the prefix, works out which app should handle it, and hands the link to that app. Periscope's prefix was pscp://.
The researcher found that a particular deeplink made the app follow a user. The link looked like this:
pscp://user/periscopeco/follow
Read it in three pieces. pscp:// says "open the Periscope app". user/periscopeco names the account to act on. follow is the action. Opening that link triggers a follow of periscopeco.
That on its own is a feature, not a bug. The problem is where the link can come from. Any web page, any QR code, any other app can open a pscp:// link. So an attacker does not need your password or your permission: they only need you to open their link while you are logged in. That is the whole attack.
This kind of attack is called cross-site request forgery, or CSRF. The everyday comparison: imagine a building where staff hold a door open for anyone wearing the company badge. A stranger cannot get a badge, but they can walk behind an employee through the open door. Here, your logged-in Periscope session is the badge, and the deeplink is the stranger walking in behind you. The app sees a valid session and does what the link says, without checking who really asked.
Proof of concept 1: a QR code
The first demonstration was a QR code. Scanning it opens the deeplink above, and the victim's account follows the profile. A QR code is just a picture of a link, so it is an easy way to get a link in front of someone: print it on a poster, put it in a chat, stick it on a table. Scanning the code opens the deeplink.
Proof of concept 2: a web page
The second demonstration, credited to kunal94, is a small HTML page. HTML is the language web pages are written in, and this page contains nothing but one link:
<!DOCTYPE html>
<html>
<a href="pscp://user/<any user-id>/follow">CSRF DEMO</a>
</html>
Line by line: <!DOCTYPE html> tells the browser this is a modern HTML page. <html> opens the page. The <a href="..."> tag creates a clickable link whose destination is the deeplink, with <any user-id> standing in for whichever account the attacker wants followed. CSRF DEMO is the text the victim sees and clicks. </html> closes the page.
Why does this matter? Because the attacker controls the page. They can host it anywhere, send the address to the victim, and dress the link up as anything they like. The victim clicks the link, the phone hands the pscp:// address to Periscope, and the app handles the follow deeplink.
The report also includes a video of the demonstration, but the text does not describe what it shows beyond the two payloads above.
The result
The stated impact is a CSRF follow against any user in the Periscope iOS app. The report was rated low severity, a bounty of 2,940.00 USD was awarded, and it was disclosed on 2020-03-31. The report does not describe a fix.
In general, how this kind of bug works
CSRF abuses a simple fact: once you are logged in, your browser or app proves who you are automatically, on every request, without asking you again. That automatic proof is called ambient authority. A cookie is the usual example: a small piece of data the site stored in your browser after you logged in, which the browser sends back on every visit so you do not have to type your password each time. A token works the same way in an app.
If a server or app performs an action that changes something (follow, like, delete, buy) and cannot tell whether you asked for it or a third party did, an attacker can trigger that action for you. The attacker never learns your password; they just borrow your logged-in state.
Mobile apps add a second way in: custom URL schemes. When an app registers a prefix such as pscp://, any web page, QR code or other app can open a link with that prefix. If the app acts on the link immediately, without confirming with the user, the same CSRF logic applies. No browser cookie is needed; the app's own logged-in state is the ambient authority.
Defences come in two groups. For ordinary web requests, the standard controls are an anti-CSRF token (a random value tied to your session that the page must send back, which an attacker's page cannot know), the SameSite cookie setting (which stops the browser sending your cookie on requests started by other sites), checking the Origin or Referer header (which says where the request came from), and asking for re-authentication before sensitive actions. For deeplinks, the app should treat every incoming link as untrusted: ask the user to confirm before doing anything that changes state, and check the link's structure and parameters before acting on it.
How to test for it
- Find the app's custom URL schemes and the deeplink paths it handles. On iOS, scheme registration is visible in the app's
Info.plist; on Android, in the manifest's intent filters. Look for paths that map to actions which change something: follow, like, subscribe, delete, purchase. - For each candidate, build a link that triggers the action and deliver it from outside the app: a link on a page the victim visits, a QR code, or another app. Watch whether the action completes with no confirmation prompt.
- Check whether the action needs the victim to be logged in and whether it uses the existing session. A positive result is a change on the victim's account caused only by opening the link, with no further interaction.
- Repeat with a fresh session and with the app in the background, to rule out cached state.
Common false positives: the app shows a confirmation dialog before acting (that is the intended defence, not a bug); the deeplink only opens a profile page without performing the action; the action needs the user to tap a button inside the app after the link opens; or the link can only be reached from inside the app, so no outside attacker can trigger it. Also check whether the action is harmless and repeatable, such as opening a screen, which is not a security issue.
How it is fixed
For deeplink-driven actions, require an explicit confirmation inside the app before any state-changing operation, and validate the link's structure and parameters. Where the same action is also reachable over HTTP, apply the standard CSRF defences: per-session anti-CSRF tokens, SameSite cookies, and Origin/Referer validation. Sensitive actions can also require re-authentication. The report does not say which of these was applied.
Hunting notes
Deeplink CSRF tends to hide in apps with rich custom schemes: social apps with follow, like and share actions; shopping apps with cart and checkout deeplinks; and apps that support universal links or app links alongside custom schemes. Recon signals include a registered scheme in the app manifest, documentation or blog posts describing deeplinks, and QR codes used for onboarding or sharing. When you find a candidate, demonstrate the full chain from an outside trigger to the change, and show the victim's account before and after. A clear, reproducible video and a minimal payload make the impact easy for a triager to accept; keep the scope to the action you can actually trigger.
Glossary
- CSRF (cross-site request forgery): an attack where a third party makes your logged-in browser or app perform an action you did not intend.
- Deeplink: a link with a custom prefix that opens a specific app and tells it what to do.
- URL scheme: the prefix of a link, such as
pscp://, that identifies which app should handle it. - QR code: a square barcode that encodes a link, scanned with a phone camera.
- HTML: the language web pages are written in.
- Cookie: a small piece of data a site stores in your browser after login and receives back on later visits.
- Session: the logged-in state a site or app keeps for you between requests.
- Ambient authority: the automatic proof of identity (cookie, token, app session) attached to requests without you doing anything.
- Token: a value used to prove identity or to tie a request to a session.
- Anti-CSRF token: a random per-session value a page must send back, which an attacker's page cannot know.
SameSite: a cookie setting that limits when the browser sends the cookie on requests started by other sites.Origin/Refererheader: request headers that say where a request came from.- State-changing action: anything that alters data, such as follow, like, delete or purchase.
- Idempotent: an action that gives the same result however many times it is repeated.
- False positive: a finding that looks like a bug but is not one.
Info.plist: an iOS app configuration file that lists, among other things, the URL schemes the app registers.- Intent filter: the Android manifest entry that declares which links an app can handle.
- Triager: the person who reviews a security report and decides whether it is valid.