SSRF on duckduckgo.com/iu/
The image proxy endpoint checked for the allowed domain by looking for the string anywhere in the URL rather than validating the actual host, so an attacker could point it at arbitrary hosts. This allowed requests to localhost, a port scan of internal services, and disclosure of a Redis status page.
- Triaged in 7 hours
- Fixed in 45 hours
- Disclosed after 17 days
Normally, a call to https://duckduckgo.com/iu contains a query parameter (u) with some path using the domain yimg.com. This call will succeed in most cases.

And if we change that path to something like https://google.com it's rejected.

However, it appears that the check that ensures that yimg.com is the target domain is solely based on whether or not that string appears in the url, independent of where. This means we can stuff it in a query parameter and bypass this check.

Furthermore, with this bypass we can hit localhost and perform a port scan (see XSPA).
For example, I have been able to conclude that services are running on the following ports:
22
25
80
443
587
6380
6432
6767
6868
8000
Some of these services don't like talking HTTP (like 22 and 25) so they never respond, but other services seem to talk HTTP and will return seemingly sensitive data about redis.
For example:
https://duckduckgo.com/iu/?u=http://127.0.0.1:6868%2fstatus%2f?q=http://yimg.com/ returns the following:
{
"current_time": "2018-08-23T17:56:06",
"deployment_environment": "prod",
"redis_local_last_successful_ping": "2018-08-23T13:56:05",
"redis_local_url": "redis://127.0.0.1:6380",
"redis_regional_last_successful_ping": "2018-08-23T13:56:05",
"redis_regional_url": "redis://cache-services.duckduckgo.com:6380",
"stat_blocked_ips_removed_since_launch": 8787,
"stat_blocked_ips_since_launch": 12185,
"stat_ipset_blocks": 266,
"stat_redis_local_messages_received": 3613,
"stat_redis_regional_messages_received": 10211,
"status": "up"
}
Impact
This could be used to interact with services that are not intended to be exposed. This also enables an XSPA attack. Additionally, information disclosure about a redis service.
Lastly, an attack on redis may be possible even though the requests seem restricted to http.
Attachments


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 allow-list check searched for the permitted domain as a substring anywhere in the URL instead of parsing the URL and comparing the actual host.
Impact
An attacker could interact with internal services not meant to be exposed, perform a cross-site port attack, and read sensitive Redis status information; the author notes an attack on Redis may be possible even though requests seem restricted to HTTP.
What the attacker needed
Ability to send requests to the image proxy
How it was found
- Send a request to the image proxy with the usual allowed domain in the query parameter and confirm it succeeds.
- Replace the target with another domain and observe that it is rejected.
- Add the allowed domain as an extra query parameter so the substring check passes while the real target is different.
- Point the request at localhost ports to see which services respond.
- Request the internal status endpoint and read the returned Redis information.
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 web server sometimes fetches a URL on your behalf, for example to resize an image. If it does not carefully check where it is allowed to fetch from, you can ask it to fetch internal addresses that outsiders cannot reach. Here the check only looked for an allowed domain name somewhere in the address, so adding it as an extra parameter let the server be pointed at its own internal services.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.