Twitter Disconnect CSRF
A GET request to disconnect a Twitter account from a Shopify profile lacked CSRF protection, so an attacker could force a logged-in user to disconnect their Twitter account by visiting a malicious page.
Originally disclosed on HackerOne
- Triaged in 33 hours
- Fixed in 34 hours
- Paid in 15 days
- Disclosed after 15 days
Hello,
Using this CSRF vulnerability one could disconnect twitter account from their profiles.
Vulnerable request
GET /auth/twitter/disconnect HTTP/1.1
Host: twitter-commerce.shopifyapps.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html, application/xhtml+xml, application/xml
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://twitter-commerce.shopifyapps.com/account
Cookie: _twitter-commerce_session=bmpuTE5EdnUvYUU0eGxJRk1kMWo5WkI3Wmh1clJkempOTDcya2R3eFNIMG8zWGdpenMvTXY4eFczTWUrNGRQeXV4ZGVycEVtTDZWcFZVbEg1eEtFQjhzSEJVbkM5K05VUVJaeHVtNXBnNTJCNTdwZ2hLL0x0Kyt4eUVlSjRIOWdYTkcwd1NQWWJnbjRNaTF5UXlwa1ZIUlAwR1JmZ1Y5WmRvN2ZHWFY5REZSUmlsR0lnMHZlSjR1OTlTMW5xWDdZRnVGSnBSeEhqbWpNS3lYZmxBNjZoVE00L3pQT2NMd1NONkdwb2pkMXhDS1E2M2RXYlovZjYwaUZnV0JQKzQySlN0MTNKNG55Zlg2azFDdVJJL3RidmJMM0VJNmRVejhZbjVDTnFZNmxFN0k9LS1lY1Y2dnpBZTJCalZzS014SldFUllBPT0%3D--77463ef21e4c8ef530f466db49f78b8e1c2e1129; _ga=GA1.2.469272249.1453024796; _gat=1
Connection: keep-alive
POC code:
<html>
<body>
{{media:0}}
</body>
</html>
Steps to reproduce
- Add twitter application at https://madamcury.myshopify.com/admin/apps/shopify-twitter
- Connect to your twitter account
- use the above poc code to disconnect the twitter account
Regards, WeSecureApp
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 disconnect endpoint used a GET request and did not require a CSRF token or other verification, allowing the action to be triggered cross-site.
What the attacker needed
Victim is logged in; victim visits attacker page
How it was found
- Add the Twitter application in the Shopify admin.
- Connect a Twitter account.
- Use the provided proof-of-concept page to trigger the disconnect.
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.
CSRF (Cross-Site Request Forgery) is when a malicious website makes a logged-in user's browser send a request to another site without the user's knowledge. Here, the disconnect action could be triggered just by loading a page, so the user's Twitter account would be unlinked without them intending it.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.