Lune

CCS2026Top-tier venue

XSS-over-DoH: On the Adverse Side Effects of DoH on Web Security

Matthias Gierlings, Lukas Knittel, Jörg Schwenk, Christian Mainka

Abstract

DNS-over-HTTPS (DoH) is a technique to resolve domain names from the DNS backbone via HTTPS requests, which at first glance seems to be an unambiguous security improvement over plain DNS. In this work, however, we show that DoH exposes the web to new security risks by introducing HTTP as an additional application layer protocol and reusing the standard HTTPS port 443. Furthermore, DoH does not strictly require the presence of HTTP headers that are essential for its secure integration into the current web ecosystem. In the light of these issues, we discovered a new class of web attacks called XSS-over-DoH. We demonstrate how attackers can exploit weaknesses in the DoH standard and attack DoH and web servers with Direct-XSS-over-DoH and CSP-Bypass-over-DoH. Direct-XSS-over-DoH achieves XSS on a website, even if there is no markup injection on that site, which other XSS attacks require. To mitigate XSS on websites, the Content Security Policy (CSP) is often recommended to neutralize the effects of markup injection vulnerabilities. Our CSP-Bypass-over-DoH circumvents this mitigation technique entirely and exploits DoH to bypass even a strong CSP, given a markup injection. These issues prove our major point: New web features like DoH may invalidate established web security technologies. Therefore, thorough research is needed when new components are introduced into the web ecosystem. The discovery of the XSS-over-DoH attacks contradicts a key security assumption present in the DoH standard, i.e., the content of DoH messages is not executable code. We investigated XSS-over-DoH and performed a large-scale Internet scan of more than 3 million domains and identified 1,297 DoH servers. Among those, 72% deliver headers that are insecure in the presence of XSS-over-DoH. Furthermore, we discovered 2,265 CSPs of public websites vulnerable to our CSP-Bypass-over-DoH attack, and we found a Direct-XSS-over-DoH vulnerability in three cases, including Proton Mail. Based on our findings, we propose substantial improvements to the DoH standard to mitigate XSS-over-DoH.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

its abstract · related work

Get the answer

Free to start. No credit card required.

Related papers

  1. Comparing the Effects of DNS, DoT, and DoH on Web PerformanceAustin Hounsel, Kevin Borgolte, Paul Schmitt, Jordan Holland et al.WWW 2020 · 59 citations
  2. 12 Angry Developers - A Qualitative Study on Developers' Struggles with CSPSebastian Roth, Lea Gröber, Michael Backes, Katharina Krombholz et al.CCS 2021 · 22 citations
  3. Encrypted DNS -> Privacy? A Traffic Analysis PerspectiveSandra Deepthy Siby, Marc Juarez, Claudia Díaz, Narseo Vallina-Rodriguez et al.NDSS 2020
  4. CSP Is Dead, Long Live CSP! On the Insecurity of Whitelists and the Future of Content Security PolicyLukas Weichselbaum, Michele Spagnuolo, Sebastian Lekies, Artur JancCCS 2016 · 114 citations
  5. AutoNav: Evaluation and Automatization of Web Navigation PoliciesBenjamin Eriksson, Andrei SabelfeldWWW 2020 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines