Brave Browser leaks your Tor / Onion service requests through DNS
Brave browser's Tor mode leaked DNS queries for .onion domains to public DNS resolvers, revealing to ISPs or DNS providers that a user accessed a specific Tor site. An attacker or observer could use these logs to identify users visiting onion services.
ramble.pw
Published on ramble.pw
Edit: (Since this is gaining traction elsewhere.) I'm not trying to shit on Brave. I'm just wanting to help protect end-users who may use Brave for it's Tor feature to do stuff over Tor that should only be done with the actual Tor browser.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely Brave's internal ad blocker was using DNS queries to check for sites bypassing ad-blocking and failed to exclude .onion domains from these checks.
Impact
ISPs or DNS providers could see that a user's IP address requested a specific .onion site, undermining the anonymity Tor is meant to provide.
What the attacker needed
Use Brave browser with Tor mode; Visit an .onion site; DNS queries go to a logging resolver
The fix
The bug was fixed by excluding .onion domains from the ad blocker's DNS checks, with the patch already in Brave Nightly and later pushed to stable.
How it was found
- Set up a DNS server that logs queries, such as Pi-hole on a Raspberry Pi or virtual machine.
- Configure the device to send DNS requests through that logging server.
- Open Brave browser and navigate to an .onion site.
- Observe the DNS logs for a query containing the .onion domain.
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 write-up has not been written yet. The Original tab links to the source.
When you visit a website, your computer asks a DNS server to translate the site's name into an IP address. Normally, Tor hides this lookup so your internet provider cannot see which sites you visit. In Brave's Tor mode, the browser still sent the .onion site name to the normal DNS server, so your provider could see you visited that hidden site.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.