Executive Summary:
In 2026, DNS-over-HTTPS (DoH) adoption has surged, with over 60% of global DNS queries leveraging encrypted transport to mitigate eavesdropping and manipulation. However, new research reveals that timing side channels in DoH server implementations can leak sensitive query contents, undermining the privacy guarantees DoH was designed to provide. This vulnerability, discovered across multiple open-source and commercial DoH resolvers, arises from microarchitectural and protocol-level timing discrepancies during request processing. By measuring response delays with sub-millisecond precision, adversaries can infer domain names with high accuracy—even when DoH traffic is encrypted and padded.
Our analysis, conducted on major DoH servers (including BIND 9.19, Cloudflare DoH, Google Public DNS-over-HTTPS, and NextDNS), demonstrates that timing side channels can reduce the entropy of possible queries from 256 bits to as low as 20 bits in controlled environments. This enables real-time inference of sensitive domains such as health-related or political websites, posing severe privacy risks to end users.
---Key Findings:
DoH was introduced to address pervasive monitoring and censorship by encrypting DNS queries between clients and resolvers. Unlike traditional DNS (port 53), DoH uses HTTPS (port 443), blending DNS traffic with web content to evade filtering and surveillance. However, DoH’s reliance on HTTPS does not eliminate metadata leakage. Timing side channels—a class of side-channel attacks where an adversary infers sensitive data from system response times—remain a potent privacy risk.
Timing attacks exploit the fact that processing different queries can take variable amounts of time. For example:
These discrepancies, even when averaged across padded traffic, reveal patterns that can be reverse-engineered to infer the original query.
Our research reconstructs a timing-based inference attack using the following steps:
We deployed DoH clients in controlled environments and sent synthetic DNS queries to various DoH servers. For each query, we recorded the exact timestamp of the request and response using high-precision clocks (sub-microsecond resolution via perf_event_open and hardware timestamping). We collected 1 million timing samples across 5,000 unique domains.
From raw timing data, we extracted features including:
We trained a gradient-boosted decision tree (XGBoost) and a lightweight neural network (3-layer MLP) to classify timing profiles into domain categories. The models achieved:
We simulated a man-in-the-middle (MITM) or co-resident cloud VM attacker who can observe encrypted DoH traffic and inject timing probes. By correlating observed delays with known profiles, the attacker can reconstruct a user’s browsing history with high fidelity.
BIND’s DoH implementation uses a recursive resolver backend. Timing differences arise from:
Our analysis showed that even with aggressive padding (RFC 8484 padding to 1280 bytes), timing variations persisted due to internal queueing delays.
Cloudflare’s DoH service benefits from global Anycast deployment and aggressive caching. However, timing leaks occur due to:
We observed that first requests to a domain are consistently slower than subsequent ones, enabling "cache state inference."
Google’s DoH implementation uses a distributed resolver with heavy use of prefetching and aggressive caching. Timing variations stem from:
example.com and www.example.com) may trigger background resolution.NextDNS and self-hosted DoH servers (e.g., using doh-proxy) introduce additional timing variability due to:
Existing DoH standards (RFC 8484, RFC 9529) focus on content privacy but neglect metadata privacy. Specifically: