Skip to content
Open redirect Disclosed report Intermediate

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.

Tarek Bouali Follow

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.

The original report as published on HackerOne, by iambouali. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Send a direct message containing more than 50 t.co links to another Twitter user.
  2. Have the recipient open the message in Twitter's Android app.
  3. Have the recipient click the 51st link in the message.
  4. 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.

More by Tarek Bouali

View all

4 more disclosed reports, best first.

More from X / xAI

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.