Skip to content
Info disclosure Disclosed report Intermediate CVE-2019-13075

Detect Tor Browser's language

Tor Browser's built-in plaintext error page uses a localised title on a stylesheet link, and a parent page can read that title through an iframe. An attacker could therefore learn the browser's language even when the user has enabled English spoofing.

ryotak Follow

Originally disclosed on HackerOne

Informational View original
  • Triaged in 4 days
  • Fixed in 5 days
  • Disclosed after 6 days

#Summary Some error pages uses Tor Browser's language based text, and iframe can steal it.

#Details Since the language of Tor Browser is used for the title of the link tag on 404 error page, an attacker can obtain the language of Tor Browser even if the user has set privacy.spoof_english to 2. I attached a PoC and a video for this.

If the server returns empty response, Tor Browser will show this page in iframe:

HTML
<html class="mozwebext">
    <head>
        <link rel="alternate stylesheet" type="text/css" href="resource://content-accessible/plaintext.css" title="Wrap Long Lines">
    </head>
    <body>
        <pre></pre>
    </body>
</html>

but if user uses Japanese (This is example, it can be used in other languages) version of Tor Browser, it'll show this page:

HTML
<html class="mozwebext">
    <head>
        <link rel="alternate stylesheet" type="text/css" href="resource://content-accessible/plaintext.css" title="長い行を折り返す">
    </head>
    <body>
        <pre></pre>
    </body>
</html>

so parent window can steal it:

title="長い行を折り返す"

Maybe there are similar vulnerability in other error page.

Impact

Attacker can steal language of Tor Browser even if the user has set privacy.spoof_english to 2.

Attachments

PoC.mov From the original on HackerOne

The original report as published on HackerOne, by ryotak. 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 internal plaintext error page uses a localised string as the title of a stylesheet link, and that title is readable by the embedding page across the frame boundary.

Impact

An attacker could learn the user's browser language despite English spoofing being enabled; the report does not show whether other error pages behave the same way.

What the attacker needed

Victim visits attacker page; attacker controls an empty-response URL

How it was found

  1. Load a page that embeds an iframe pointing at a server that returns an empty response.
  2. Tor Browser renders its built-in plaintext page inside the iframe.
  3. Read the title of the stylesheet link from the parent window.

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 Browser has a setting that is meant to make websites think you speak English, so your real language stays private. When a page loads an empty response inside a frame, the browser shows a built-in page whose link title is translated into your language. The surrounding page can read that title, which reveals your language.

What is Info disclosure?

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

More by ryotak

View all

23 more disclosed reports, best first.

More from Tor

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.