SSRF on testing endpoint
The URL parameter on a testing endpoint allowed requests to internal services, including the OpenStack metadata server and a local admin panel. An attacker could use this to reach internal resources that are not normally accessible from the internet.
- Fixed in 1 hour
- Disclosed after 5 months
Synopsis
The form at https://www.apitest.io/request accepts (among others) the "url" parameter. This feature allows to reach internal services (like the OpenStack metadata server) or services running on loopback.
Identified services
http://0x7f.1/ (nginx) => "If you see this page, the nginx web server is successfully installed and working. Further configuration is required."
http://169.254.169.254/meta-data (OpenStack metada) => directoty listing (instance-id, mac, local-ipv4, public-ipv4, network_config/content_path, SUBID, ipv6-addr, ipv6-prefix)
http://0x7f.1:8081/ (vestacp admin panel) => <a href="http://vestacp.com/">Powered by VESTA</a>
Impacts
The metadata server does't seem to host any sensitive data. However, access to port 8081 may allow to reconfigure the OS or services (untested). Additional services may exist, but it seems that my IP address (81.56.184.117) was just blacklisted on your side.
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 endpoint fetched user-supplied URLs without restricting them to external, safe destinations.
Impact
The metadata server did not appear to hold sensitive data, but access to the admin panel could potentially allow reconfiguration of the OS or services, though this was untested; further services may exist.
What the attacker needed
Access to the testing form
How it was found
- Submit a URL pointing to the loopback address to reach a local nginx server.
- Submit a URL pointing to the cloud metadata address to list metadata.
- Submit a URL pointing to a local port to reach an admin panel.
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) bug lets an attacker make a website's server send requests to places the attacker cannot reach directly, such as internal machines. Here, a form that fetches a URL could be pointed at internal addresses, revealing services like a metadata server or an admin panel.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.