Skip to content
DoS Disclosed report Beginner

Denial of Service | twitter.com & mobile.twitter.com

A crafted URL containing an oversized port number caused twitter.com and mobile.twitter.com to become unusable in some browsers when a victim viewed the link. An attacker could send this link to a target or post it on a popular tag so that a large audience could no longer access Twitter from the browser.

try_to_hac Follow

Originally disclosed on HackerOne

Bounty$1,120 Medium View original
  • Triaged in 4 days
  • Fixed in 44 days
  • Paid in 17 days
  • Disclosed after 2 months

Hi Team,

Detail: I found a DoS that works on twitter.com and mobile.twitter.com, but it doesn't work on the mobile app. The user only needs to view the message or tweet in order to be exposed to this DoS. As far as I can remember, a report similar to this report has been sent to you before, but I think it's no longer public.

Note:

  • If the user tries to view the DoS message or tweet from twitter.com, DoS will definitely work, but if it enters from Chrome and displays this DoS from mobil.twitter.com, this DoS will not work. This works without exception in Edge and Firefox.

  • I think this is a browser-based DoS, so I think it won't work on Desktop Twitter. So I didn't test it.

  • I did my tests on my own accounts. I haven't done a test for any tag. But I'm sure it will work.

PoC & Steps: http://twitter.com:627732462

Twitter-Dos.mp4 From the original on HackerOne

Impact

An attacker could apply this DoS to any Twitter account or popular tag. It prevents a large audience or target user from accessing Twitter from the browser.

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

The target is Twitter's web application, specifically twitter.com and mobile.twitter.com. The feature involved is the display of a tweet or direct message in the browser. Normally, when a user views a tweet or message, the browser renders the content without any unusual resource consumption. The researcher found that a crafted URL could cause a denial of service (DoS) when viewed in a browser, affecting the user's ability to access Twitter.

Setup

The researcher tested on their own accounts and did not test against any specific tag or user. The report does not mention specific browser versions or tools used beyond the browsers themselves. The precondition is that the victim views the crafted message or tweet in a browser on twitter.com or mobile.twitter.com. The DoS does not work on the mobile app, and the researcher notes that it likely does not work on Desktop Twitter (the desktop application), so they did not test it there.

Finding it

The researcher discovered that a URL of the form http://twitter.com:627732462 causes a denial of service when visited. The port number (627732462) is outside the valid range for TCP ports (0-65535). The report does not explain the mechanism. The researcher observed that simply viewing a message or tweet containing this URL triggers the DoS. They also noted that a similar report may have been sent previously but was no longer public.

Exploitation

Step 1: Craft the malicious URL

The payload is a URL with an invalid port number:

HTTP
http://twitter.com:627732462

This URL is placed in a tweet or direct message. When a user views the tweet or message, the browser attempts to interpret the URL. The port number 627732462 exceeds the maximum valid port (65535), which likely causes the browser to enter a loop or consume excessive resources while trying to handle the invalid port.

Step 2: Victim views the tweet or message

The victim only needs to view the message or tweet containing the URL. No further interaction (such as clicking) is required. The researcher demonstrated this in a video:

Twitter-Dos.mp4 From the original on HackerOne

The researcher notes that the DoS works on twitter.com and mobile.twitter.com, but on mobile.twitter.com via Chrome it does not work; it works without exception in Edge and Firefox. The researcher did not test on Desktop Twitter, suspecting it would not work there.

Root cause

The root cause is likely the browser's handling of URLs with invalid port numbers. When a URL contains a port number greater than 65535, the browser may repeatedly attempt to parse or connect, leading to a denial of service.

Impact

An attacker could apply this DoS to any Twitter account or popular tag by including the crafted URL in a tweet or message. This prevents a large audience or the targeted user from accessing Twitter from the browser. The impact is limited to browser access; the mobile app is not affected. The researcher did not test against specific tags but is confident it would work.

Fix

To prevent this, Twitter could sanitise URLs in tweets and messages to reject invalid port numbers, or browsers could handle such URLs more gracefully.

Variants to test

  • Try other invalid port numbers (e.g. http://twitter.com:999999) to see if they also cause DoS.
  • Test on other Twitter domains or subdomains that render user content.
  • Test on other browsers or platforms to identify scope.
  • Test with different URL schemes (e.g. https://) to see if the behaviour changes.

Hunting notes

This kind of bug tends to hide in user-generated content that is rendered without proper sanitisation, especially URLs. During recon, look for features that display links or embedded content. The researcher showed impact by demonstrating that merely viewing the content triggers the DoS, affecting any user who views it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

What happened, in plain words

Twitter is a website where people post short messages called tweets and send private messages to each other. When you open a tweet or a message in your browser, the browser has to display whatever is inside it, including any links. The researcher found that a link written in a special, broken way could cause a denial of service for the person viewing the tweet or message in a browser. This kind of attack is called a denial of service, or DoS: the goal is not to steal data or break into an account, but to stop something from working for the people who need it.

The important part is that the victim does not have to click anything. Just viewing the tweet or message is enough. The researcher tested this on their own accounts, on twitter.com and mobile.twitter.com, and recorded a video of it happening.

A quick word on the two addresses involved. twitter.com is the main website you reach in a browser. mobile.twitter.com is the version of the site designed for phones, which you can also open in a phone's browser. The Twitter mobile app is a separate program installed on the phone, and the researcher says the trick does not work there.

The setup

The researcher used their own accounts for the tests. They did not aim the test at any particular person or tag (a tag, or hashtag, is a label like #something that groups posts together). The report does not name specific browser versions or any tools beyond the browsers themselves.

The one condition for the attack is that the victim views the crafted tweet or message in a browser on twitter.com or mobile.twitter.com. The researcher also says they believe the trick will not work on Desktop Twitter, the desktop application, so they did not test it there.

Finding it

The researcher found that a web address of this shape causes the problem when it is visited:

HTTP
http://twitter.com:627732462

To understand why this is odd, you need to know what the number after the colon means. In a web address, the part after the colon is the port number. A port is like a numbered door on a computer: the browser knocks on a particular door to reach a particular service. The normal door for a website is 80 for http and 443 for https. Port numbers only go up to 65535. The number 627732462 is far beyond that limit, so it is not a real door at all.

The report does not describe the exact internal behaviour of the browser; it only says the researcher believes the problem is browser-based.

The researcher also mentions that a similar report may have been sent before, but that it was no longer public.

Exploitation

Step 1: Craft the malicious URL

The payload is a single web address with an invalid port number:

HTTP
http://twitter.com:627732462

Line by line, in plain words:

  • http:// tells the browser to use the ordinary, unencrypted web protocol. It is the same prefix you see at the start of most links.
  • twitter.com is the site the browser is being pointed at.
  • :627732462 is the port number, and it is the broken part. A valid port is a whole number from 0 to 65535. This number is much larger, so the browser is being asked to use a door that cannot exist.

This address is then placed inside a tweet or a direct message. The reason for putting it there is that tweets and messages are shown to other people: anyone who opens the post will have the address rendered by their own browser, and that is when the trouble starts.

Step 2: The victim views the tweet or message

The victim only has to view the message or tweet that contains the address. There is no need to click it. The researcher demonstrated this in a video:

Twitter-Dos.mp4 From the original on HackerOne

The researcher's notes on where it works are specific:

  • On twitter.com, the DoS works.
  • On mobile.twitter.com opened in Chrome, the DoS does not work.
  • In Edge and Firefox, it works without exception.
  • The mobile app is not affected.
  • Desktop Twitter was not tested, because the researcher expected it would not work there.

Root cause

The likely cause is how the browser deals with a web address that contains an impossible port number. When the number is above 65535, the browser may keep trying to parse it or connect to it, and that repeated work can exhaust the browser. The report does not spell out the exact browser behaviour; the researcher's view is that the issue lives in the browser.

Cleaning up user-supplied content like this is usually called sanitisation: checking input and removing or rejecting anything dangerous before showing it to other people. Because the address is passed through to the victim's browser unchanged, the victim's browser is the one that runs into the problem.

Impact

An attacker could use this against any Twitter account or any popular tag by putting the crafted address into a tweet or message. The result is that a large audience, or one targeted user, cannot reach Twitter from the browser. The effect is limited to browser access: the mobile app is not affected. The researcher did not test against specific tags but was confident it would work.

Fix

In general terms, Twitter could clean up addresses in tweets and messages so that invalid port numbers are rejected, or browsers could be made to handle such addresses more gracefully.

Variants to test

These are follow-up ideas in the same spirit as the original test:

  • Try other invalid port numbers, such as http://twitter.com:999999, to see whether they cause the same effect.
  • Test other Twitter domains or subdomains that display content written by users.
  • Test other browsers or platforms to map out where it works and where it does not.
  • Try a different scheme, such as https://, to see whether the behaviour changes.

Hunting notes

Bugs of this kind tend to hide in content written by users that is displayed without proper cleaning, especially links. When you are looking around a site, pay attention to features that show links or embedded content. The researcher showed the impact by proving that merely viewing the content triggers the DoS, which means anyone who views it is affected.

Glossary

  • Denial of service (DoS): an attack that stops a service or program from working for the people who use it, without necessarily stealing anything.
  • Tweet: a short public post on Twitter.
  • Direct message: a private message sent from one Twitter account to another.
  • Browser: the program you use to open websites, such as Chrome, Edge or Firefox.
  • Web application: a website that behaves like a program, taking input and responding to it.
  • URL: a web address, the text you type or click to reach a page.
  • Port number: the numbered door on a computer that a network connection uses; valid values run from 0 to 65535.
  • Protocol: the agreed set of rules two computers use to talk, such as http or https.
  • http: the ordinary, unencrypted protocol for web pages.
  • https: the encrypted version of http.
  • Payload: the piece of input, here a web address, that is used to trigger the bug.
  • Sanitisation: checking content supplied by users and removing or rejecting anything dangerous before showing it to others.
  • Resource exhaustion: using up a computer's memory, processing power or connections until it can no longer do its job.
  • Tag (hashtag): a label starting with # that groups posts on a topic.
  • Subdomain: a part of a domain name placed before it, such as mobile in mobile.twitter.com.
  • Severity: a rating of how serious a bug is, here medium.
  • Bounty: a payment made by a company to a researcher who reports a valid bug.
  • PoC: proof of concept, a small demonstration that the bug is real.

More by try_to_hac

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.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.