Skip to content
SSRF Disclosed report Intermediate

SSRF in https://cards-dev.twitter.com/validator

The Twitter card validator fetched URLs supplied by the user, including internal addresses, and returned different error messages that revealed whether a port was open and whether a path existed. An attacker could use this to map internal services and potentially reach an internal command-execution endpoint.

mindaugas Follow

Originally disclosed on HackerOne

  • Triaged in 5 days
  • Fixed in 55 days
  • Paid in 12 days
  • Disclosed after 5 months

Hello,

After my previous report (2 years ago) https://hackerone.com/reports/30860 you fixed the vulnerability, but now it looks like this fix was reverted and the same problem exists again.

Test scenario: Open https://cards-dev.twitter.com/validator

  1. Closed port on localhost

http://0.0.0.0:123 -> ERROR: Fetching the page failed because other errors.

  1. Open port but not HTPP

http://0.0.0.0:22 -> ERROR: Failed to fetch page due to: ChannelClosed

  1. Open HTPP port

http://0.0.0.0:4680 -> INFO: Page fetched successfully INFO: 2 metatags were found WARN: Not whitelisted

  1. Existing folder

http://0.0.0.0:4680/system/ -> INFO: Page fetched successfully INFO: 2 metatags were found WARN: Not whitelisted

  1. None existis folder

http://0.0.0.0:4680/system/ -> http://0.0.0.0:4680/test/ INFO: Page fetched successfully WARN: No metatags found

Disaster scenario: Find open HTTP service running on local infrastructure with ability to execute commands.

For example: http://0.0.0.0:4680/system/command.php?command=[ROOT_COMMAND]

Attachments

twitter.png
twitter.png From the original on HackerOne

The original report as published on HackerOne, by mindaugas. 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 the validator did not restrict which hosts or IP addresses it could fetch, allowing requests to internal addresses and leaking information through error messages.

Impact

An attacker could probe internal services and potentially reach an internal command-execution endpoint, though the report only demonstrates information disclosure via error messages.

What the attacker needed

Access to the card validator page; none

The fix

The validator should restrict which hosts it fetches and avoid leaking information through error messages.

How it was found

  1. Open the card validator page.
  2. Submit a URL pointing to a closed port on localhost and observe the error.
  3. Submit a URL pointing to an open non-HTTP port and observe a different error.
  4. Submit a URL pointing to an open HTTP port and see that the page is fetched.
  5. Submit URLs for existing and non-existing folders to see different responses.

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.

A server-side request forgery (SSRF) happens when a website fetches a URL for you but does not check where that URL points. Here, the card validator would try to load any address, even ones inside Twitter's own network, and its error messages told the attacker what was running there. That could let someone find and use internal services that are not meant to be public.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More from X / xAI

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.