How can DNS leaks occur when using Tor and how do they expose search terms to my ISP?

Checked on December 4, 2025
Disclaimer: Factually can make mistakes. Please verify important information or breaking news. Learn more.

Executive summary

DNS leaks occur when DNS queries escape the Tor network and go to the local resolver or ISP instead of being resolved by the Tor exit node; real-world bugs and OS/app behavior have repeatedly caused such leaks, including Brave sending .onion queries to public DNS servers (bug disclosed and fixed) [1] [2] [3]. When DNS queries go to an ISP or public resolver, the domain names you visit — and therefore your search terms if embedded in the URL or requested resources — become visible to that DNS operator and to any observer of that path [3] [4].

1. How DNS normally works with Tor — the architecture that prevents leaks

Tor clients normally avoid local DNS lookups by sending the hostname to a Tor exit node via SOCKS; the exit node performs the actual DNS resolution and opens the TCP connection, so your local ISP’s resolver should not see the hostname [5] [6]. Tor Browser specifically configures Firefox to use SOCKS remote DNS (network.proxy.socks_remote_dns) so DNS resolution is tunneled through Tor rather than done by the OS resolver [7] [6].

2. How DNS leaks actually happen — software bugs and OS-level behavior

DNS leaks happen when applications or the operating system perform name resolution outside of the Tor tunnel. That can be due to browser features, extensions, or ad-blocking mechanisms that perform their own DNS queries, or when apps on the host issue DNS requests independently [3] [4] [7]. A concrete example: Brave’s “Private Window with Tor” mode had a bug where the browser performed DNS queries for .onion addresses to configured DNS servers (including 8.8.8.8), which revealed visited Tor addresses and could leak the user’s IP to their ISP; that was reported on HackerOne and publicly validated by security researchers before Brave patched it [1] [2] [3].

3. Why leaked DNS queries expose search terms and visit intent

DNS queries reveal the domain names being resolved. If a search term appears in the hostname or is included as part of URLs requested by the browser (for example, search query strings, tracker subdomains, or third‑party resources), those strings or associated domains can be inferred by the DNS resolver or ISP that receives the leaked query [3] [4]. Privacy-focused reporting on these leaks highlights that even when Tor encrypts traffic, escaped DNS lookups “silently” reveal which services or onion sites users attempt to reach [4] [3].

4. System-level pitfalls: routers, VPNs, and apps outside Tor

Running Tor through a router or combined with a VPN introduces extra failure modes. Home routers, OS DNS settings, or VPN clients can force DNS to send queries to specific resolvers or to use encrypted DNS locally; misconfiguration or OS behavior (including IPv6 vs IPv4 differences) can cause DNS to bypass Tor entirely [8] [4] [9]. Community advice includes forcing all DNS to a controlled resolver and using firewall rules to “fail closed,” but these are technical workarounds rather than silver-bullet fixes [8] [7].

5. Detection and mitigation — what users and admins can do

Tor Project guidance shows how to detect SOCKS/DNS leaks by enabling test logging (TestSocks) and SafeSocks in torrc to get warnings or block leaking connections; monitoring with tcpdump on the LAN side of a Tor router can reveal DNS traffic that should not be present [10] [8]. Practical mitigations cited in community sources include hard-routing DNS through Tor, blocking direct DNS egress at the firewall, disabling non‑Tor features in applications (for example Brave’s CNAME decloaking was disabled for Tor mode after the bug), and using vetted environments like Tails/Whonix that are designed to prevent leaks [3] [7] [4].

6. Trade-offs, competing perspectives and limitations of reporting

Community and Tor Project posts argue Tor Browser itself is designed to avoid DNS leaks and that leaks are typically caused by other software or misconfiguration; several Stack Exchange posts stress that a properly configured Tor Browser shows exit-node DNS behavior in tests and that leaks are treated as severe bugs [6] [11]. At the same time, vendor disclosures (Brave) and forum reports document practical failures and the variety of leak vectors, showing both the robustness of Tor’s design and its fragility in complex real-world environments [1] [2] [3]. Available sources do not mention specific modern ISP machine-learning surveillance capabilities beyond general warnings about metadata collection (not found in current reporting).

7. Bottom line — what this means for your privacy

If any DNS request leaves your machine or router without going through Tor (due to a browser bug, OS behavior, or misconfiguration), your ISP or the resolver will learn the domains you request and may infer search intent or visited services; such leaks have occurred in practice (Brave) and are detectable and fixable with proper tooling and configuration [1] [3] [10]. Users must assume the Tor client is only one part of the stack — verify with logs and packet captures, avoid mixing untrusted apps with Tor, and prefer well-audited Tor bundles or isolated OSes when anonymity matters [7] [4].

Want to dive deeper?
What is the difference between DNS and DNS over HTTPS when using Tor?
How can misconfigured applications cause DNS requests to bypass the Tor network?
What tools and tests can I use to detect DNS leaks while connected to Tor?
How do operating system DNS settings (like systemd-resolved or DNS cache) create leaks with Tor?
What are effective steps to prevent DNS leaks and protect search terms from my ISP when using Tor?