SSRF & Google HOF(Hall of Fame)
A Google-hosted open-source project exposed a conversion endpoint that accepted a URL parameter without validating the URI scheme, allowing server-side requests to arbitrary locations. The author reports this led to local file inclusion via SSRF, and Google eventually awarded a bounty after initially declining.
Published on apth3hack3r.medium.com
This time I will talk about a very interesting SSRF(Server Side Request Forgery) on a Google asset and interesting because the way I found the endpoint. Read below to find out.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the endpoint passed a user-supplied URL to a fetch routine without validating the URI scheme, so non-HTTP schemes such as file were accepted.
Impact
An attacker could make the server fetch arbitrary URLs, which in this case led to reading local files; the author notes Google initially declined a bounty before later awarding one.
What the attacker needed
Knowledge of the open-source repo; the deployed appspot.com URL; no authentication mentioned
How it was found
- Find the open-source repository and the deployed appspot.com URL referenced in it
- Send a POST request to the /convert/licenses endpoint
- Observe the response saying the URL parameter is missing
- Send a POST request with a url parameter in the JSON body
- Observe local file inclusion resulting from the SSRF
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 write-up has not been written yet. The Original tab links to the source.
A server-side request forgery (SSRF) happens when a web app fetches a URL that the user supplies, so the attacker can make the server talk to places the attacker cannot reach directly. Here the endpoint took a URL and fetched it without checking what kind of address it was, so the server could be pointed at local files. Local file inclusion (LFI) means reading files on the server itself rather than over the network.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.