Skip to content
SSRF Disclosed report Intermediate

Bypassing Whitelist to perform SSRF for internal host scanning

The server-side request forgery protection on a proxy endpoint used a whitelist that could be bypassed by placing a backslash before the allowed hostname, causing the backend to treat the allowed host as credentials and send the request to an attacker-controlled or internal host. An attacker could use this to make the server send requests to arbitrary external URLs and to scan internal hosts for liveness.

imthatt Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 59 days
  • Disclosed after 5 months

Hello

I have managed to identify a misconfiguration on the server side request forgery protections under host geonode.state.gov/proxy/?url=

This is using a whitelist protection to ensure only allowed domains and requested in the url e.g. url=geonode.state.gov sends a request.

The backend is configured differently to the front end and here we can trick the backend to send requests that are not in the whitelist and also include internal IPs for host scanning.

Using the URL -- - GET geonode.state.gov/proxy/?url=http://[email protected] will send a request HTTP from the server to your burp collaborator URL, see screenshot and the response will be displayed on the response page.

changing the URL to geonode.state.gov/proxy/?url=http://[email protected] identifies the alive host 169.254.169.254 which is the internal AWS instance as the response shows "404 NOT FOUND". This shows the host is alive on the IP, but because the server is converting the \ to /@geonode.state.gov it is sending the request http://169.254.169.254/@geonode.state.gov which is obviously not an existing endpoint of 169.254.169.254, but it shows this IP address and host are alive. To confirm do http://169.254.169.251/@geonode.state.gov and you will not get a response, showing the iP host is not alive

We can use this information to conduct internal host scans to identify alive hosts across the internal network, monitoring responses back. This is a low issue at this stage as no RCE has been achieved, but it has still shown a misconfiguration in the SSRF protection.

The misconfiguration exists because the front end seeing the whitelist host geonode.state.gov exists in the URL, but the backend is parsing this as a credential host, but the \ before on the backend terminates the HTTP lookup and will send a request to the host identified before the .

Impact

ssrf misconfiguration allowing internal host scanning on the internal network

Attachments

ssrf.PNG
ssrf.PNG From the original on HackerOne

The original report as published on HackerOne, by imthatt. 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 front-end whitelist check and the backend URL parser disagreed on how to interpret a backslash before the allowed hostname, so the backend treated the allowed host as credentials and connected to the host before the backslash.

Impact

The misconfiguration could allow internal host scanning and requests to arbitrary external hosts, but no remote code execution was achieved.

What the attacker needed

Access to the proxy endpoint; ability to send crafted URL parameters

How it was found

  1. Send a request to the proxy endpoint with a URL parameter containing an attacker-controlled host followed by a backslash and the allowed hostname.
  2. Observe that the server sends an HTTP request to the attacker-controlled host and displays the response.
  3. Replace the attacker host with an internal IP address to test whether that host is alive.
  4. Compare responses for a known-alive internal IP and a non-alive IP to confirm host scanning.

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 proxy endpoint lets a server fetch a URL on your behalf. The protection tried to allow only certain domains, but by adding a backslash before the allowed domain, the server misinterpreted the address and sent the request to a different host. This let the attacker make the server contact outside servers and probe internal network addresses.

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 by imthatt

View all

3 more disclosed reports, best first.

More from U.S. Department of State

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.