Here's the (redacted) attack link:
https://x.com/ [BREAK INSERTED] i/oauth2/authorize?response_type=code&client_id= [UNIQUE ID REMOVED] Q&redirect_uri=https%3A%2F%2Ftwo.opensourced.us%2Fapi%2Fcallback%3Fi%3Dtwit&scope=tweet.read+users.read+mute.write+tweet.write+tweet.moderate.write+offline.access&code_challenge= [UNIQUE ID REMOVED] &code_challenge_method=plain
@pluralistic hm. Twitter shouldn't be automatically authorizing OAuth2 requests.
My assumption here is that you logged into some random app with your twitter account, and the twitter account of whoever setup that app got hacked or sold their account, OR someone let that opensourced.us domain expire and an attacker bought it?
@pluralistic you should have gotten a confirmation page at that link, asking if you wanted to give those permissions to the remote site?
Normally the initial setup tokens are only good for a very short time for exactly this reason - use it as part of an interactive process or not at all.
X should also drop-kick that client app ASAP; one of the important protections oauth gives is the ability to retroactively restrict API clients.
Good job catching it!
@blaine I didn't click the link, so I can't confirm that behavior.
Cory
@pluralistic a good policy!
It was almost certainly safe to click the link, but less savvy folks could easily be phished in that sort of a scenario (people love clicking that OK button!).
I haven't thought about the details of this stuff in aaaages but there should be a referrer check in there as well that would prevent the attack from working at all.
@pluralistic Good warning to anyone still using the Twitter platform.
I wonder if the vulnerability is being left open on purpose as a favor for Putin by his minion Musk.
In either Red Team Blues or the Bezzle, I don't remember which, Hench was thinking about security vulnerabilities. He said something said, "It's better if the box (the vulnerability) doesn't exist."
In this case, I'd say the vulnerability is you still having an account on Twitter. Nevermind that you hardly post there. The account itself is a risk.
@pluralistic "inviting me to click a button to prevent this."
Never never.
@pluralistic Sorry, but since there is so much fishing goin on i never again click any link in any email.
If this is a genuine email about something i can certainly log into the website directly and find there whatever the email wants me to act on or remind of. If i can't find it then it cannot be that inportant or ... i just delete the email because it's fake!
This will 100% protect me from fishing emails unless Thunderbird has a zero click bug (i hope not 😉, fingers crossed).
Smells like Twilio.