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.
- 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
- Closed port on localhost
http://0.0.0.0:123 -> ERROR: Fetching the page failed because other errors.
- Open port but not HTPP
http://0.0.0.0:22 -> ERROR: Failed to fetch page due to: ChannelClosed
- Open HTPP port
http://0.0.0.0:4680 -> INFO: Page fetched successfully INFO: 2 metatags were found WARN: Not whitelisted
- Existing folder
http://0.0.0.0:4680/system/ -> INFO: Page fetched successfully INFO: 2 metatags were found WARN: Not whitelisted
- 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

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
- Open the card validator page.
- Submit a URL pointing to a closed port on localhost and observe the error.
- Submit a URL pointing to an open non-HTTP port and observe a different error.
- Submit a URL pointing to an open HTTP port and see that the page is fetched.
- 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.