X / xAI · Report #87040
XSS on OAuth authorize/authenticate endpoint
Validstatus
23upvotes
20 Nov 2015disclosed
Summary
Write-up: https://blog.innerht.ml/csp-2015/
How it was found
Hi, I would like to report an issue where certain endpoints on twitter.com and api.twitter.com is vulnerable to XSS.
Detail
The redirection page after authorization/authentication does not sanitize the oauth_callback parameter.
PoC
- Go to http://innerht.ml/pocs/twitter-oauth-xss (Please use IE or something that hasn't implemented CSP)
- Click on Authorize app
- Alert pops up
Note: it also affects api.twitter.com as they both have the same endpoints
Repo step
- Obtain the request token (https://api.twitter.com/oauth/request_token) where parameter oauth_callback contains HTML like
javascript%3A%2F%2F"><script>alert(document.domain)</script> - Redirect the victim to the authorize/authenticate page with the token