Skip to content
Info disclosure Disclosed report Intermediate

Tor IP leak caused by the PDF Viewer extension in certain situations

The PDF viewer extension in Brave's Tor windows made web requests that bypassed the Tor proxy if no HTTP/HTTPS page had been loaded in that Tor session. An attacker could learn the user's real IP address by hosting a PDF that the extension fetched directly.

world_languages Follow

Originally disclosed on HackerOne

  • Fixed in 4 days
  • Paid in 4 days
  • Disclosed after 4.1 years

Summary:

Web requests made by browser extensions in the Tor profile aren't proxied if the user didn't load any HTTP/HTTPS website in a Tor window since the browser first launched.

This wouldn't really be a problem because extensions can't be used in Tor windows. However, Brave has some built-in extensions (Brave, Brave Rewards, Brave WebTorrent, PDF viewer) that also run in Tor mode. This last one can cause problems.

If:

  • The user didn't visit any HTTP/HTTPS page with Tor in that browser session.
  • The user goes to chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/pdf-url in a Tor window.

Then the server hosting pdf-url will get the real IP address of the user, even tho the PDF was loaded in a Tor window.

This happens because the PDF viewer extension requests the PDF as an AJAX request, and as mentioned before, requests aren't proxied until an HTTP/HTTPS address is loaded with the address bar in a Tor window (or you "duckduckgo" something).

Products affected:

This was tested in the most recent versions of Brave Stable & Dev, in a Windows 10 PC. Stable: 0.65.118 Chromium: 75.0.3770.80 (Official Build) (64-bit) Dev: 0.67.77 Chromium: 75.0.3770.80 (Official Build) dev (64-bit)

Steps To Reproduce:

  1. Close Brave normally.
  2. Make sure Brave is actually closed (if the Brave icon is in the Windows toolbar, right click it and press exit. You can also use task manager to kill the processes).
  3. Open Brave again.
  4. Open a Tor window. Don't open any website in the Tor window before step 5.
  5. Go to this URL: chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/http://ip-pdf.glitch.me/ . The request to glitch.me won't be proxied with Tor - you'll see the PDF returned by it will include your real IP address.
  6. (optional) Load a website in the Tor window as a new tab (e.g. duckduckgo.com).
  7. (optional) Refresh the PDF. You'll see the request to get the PDF is now proxied, because an HTTP website has been loaded.

Supporting Material/References:

Node JS server for ip-pdf (source): https://glitch.com/~ip-pdf

Impact

All HTTP/HTTPS requests, AJAX or not, are supposed to be proxied in Tor windows. This doesn't happen in this situation, leading to an IP leak. However, the severity isn't high because certain conditions must be met for this to happen.

The original report as published on HackerOne, by world_languages. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 Tor proxy was only activated after an HTTP/HTTPS page was loaded in a Tor window, so extension-initiated requests made before that point went out directly.

Impact

A user's real IP address could be leaked to a server hosting a PDF, but only if the user opened the PDF through the extension in a fresh Tor window before visiting any HTTP/HTTPS site.

What the attacker needed

Brave browser with Tor windows; Fresh browser session; No HTTP/HTTPS page loaded in Tor window; User opens a crafted PDF URL in Tor window

How it was found

  1. Close Brave completely, ensuring no processes remain.
  2. Reopen Brave and open a Tor window without visiting any website.
  3. Navigate to a chrome-extension URL for the PDF viewer that points to an external PDF.
  4. Observe that the PDF is fetched without Tor proxying, revealing the real IP address.
  5. Optionally load a normal website in the Tor window and refresh the PDF to see the request become proxied.

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.

Tor is a network that hides your real IP address by routing traffic through several relays. Brave has a private window that uses Tor, but some built-in extensions still run there. The PDF viewer extension fetched a PDF without going through Tor, so the website hosting the PDF saw the user's real IP address instead of a Tor exit node's address.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Brave Software

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.