Bypass t.co link shortener in Twitter direct messages
Twitter's direct messages normally replace links with safe t.co shortened URLs, but a message containing more than 50 t.co links caused the 51st link to bypass this replacement. An attacker could send such a message so that a recipient on the Android app who clicks the 51st link is taken directly to the target website without the t.co safety check.
Originally disclosed on HackerOne
- Paid in 22 days
- Disclosed after 44 days
Summary by the program
The researcher demonstrated a way to create a link that will not be replaced with safe shortened t.co url, by sending Direct Messages containing more than 50 t.co links to another Twitter user. If the recipient views the message using Twitter’s Android app, and clicks the 51st link in the attacker’s message, they will be redirected to the target website without first passing through Twitter’s t.co link shortener.
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 a limit in the link-rewriting logic that stops processing after a certain number of links, leaving later links unshortened.
Impact
A recipient on the Android app could be sent to a website without the usual t.co safety check, but the bypass only works when the message contains more than 50 links and the recipient clicks the 51st.
What the attacker needed
Twitter account to send the message; recipient uses Twitter's Android app; message contains more than 50 t.co links; recipient clicks the 51st link
How it was found
- Send a direct message containing more than 50 t.co links to another Twitter user.
- Have the recipient open the message in Twitter's Android app.
- Have the recipient click the 51st link in the message.
- Observe that the recipient is redirected to the target website without passing through t.co.
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.
Twitter usually rewrites links in messages to go through its own shortener, t.co, so it can check them for safety. This researcher found that if a message has more than 50 such links, the extra ones are not rewritten. That means a link hidden after many others can send someone straight to a website without Twitter's safety check.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.