SSRF vulnerability (access to metadata server on EC2 and OpenStack)
A server-side request forgery (SSRF) vulnerability in Phabricator's meme creation feature allowed attackers to make the server send requests to arbitrary URLs. This could be used to access the EC2/OpenStack metadata service at [redacted], potentially exposing sensitive instance data such as hostnames, IP addresses, and startup scripts that may contain credentials.
- Fixed in 3 days
- Paid in 3 days
- Disclosed after 3 days
In bug #50537, haquaman reported a SSRF vulnerability in the meme creation section of Phabricator. Ticket T6755 was created and the HackerOne issue was closed as "Won't fix".
T6755 states that "attackers can use the machine's ability to access the network, which may allow them to find services (and, in some rare cases, interact with services that have very, very weak authentication and act over HTTP GET)".
Hoewever, some common deployement scenarios (using Amazon EC2 or OpenStack) include a "metadata" web server listening on a multicast IP (169.254.169.254):
- EC2: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
- OpenStack:http://docs.openstack.org/admin-guide-cloud/content/section_metadata-service.html
Given the multicast IP address, this server can only reached from the instance itself.
Plenty of interesting information are stored at /latest/meta-data/ (hostname, private and public IP addresses, ...). However, the worst scenario is auto-starting instances, where a startup script is stored in /latest/user-data. These startup scripts may include passwords, private keys, source code, ...
Test URLs:
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/user-data
Outside of EC2 and OpenStack, some services are commonly bound to localhost, including monitoring software, noSQL databases, administration interfaces, ...
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 meme creation feature accepted arbitrary user-supplied URLs and fetched them without restricting access to internal or link-local addresses.
Impact
An attacker could potentially read cloud instance metadata, including startup scripts that may contain passwords, private keys, or source code, and in rare cases interact with weakly authenticated services.
What the attacker needed
Attacker can supply a URL to meme creation; Target runs on EC2/OpenStack or has localhost-bound services
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.
SSRF (Server-Side Request Forgery) is when a website lets you trick its server into making requests to other systems on your behalf. Here, the meme creation tool fetched images from user-supplied URLs, so an attacker could point it at a special internal address ([redacted]) that only the server itself can reach. That address hosts cloud metadata, which can include secrets like passwords or private keys.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.