Skip to content
Info disclosure Disclosed report Intermediate CVE-2024-5690

Leaking Browser URL/Protocol Handlers by img onerror loading time

A web page can detect which external protocol handlers are installed on a visitor's system by measuring the time between starting to load an image with a custom protocol URL and the firing of its error event. This allows fingerprinting of installed applications without user interaction.

Satoki Tsuji Follow

Originally disclosed on Mozilla

  • Fixed in 58 days
  • Paid in 2 months
  • Disclosed after 58 days
Text
Created attachment 9389415
poc_img.html

Hello, I'm Satoki, a CTF player and security engineer. Inspired by CVE-2020-15680, I've discovered a new leak involving external protocol handlers. The mechanism is simple: it measures the time from when the loading of an "img" tag starts to when the "onerror" event is triggered. I've found that if a handler exists, there's a delay in response.
'''
Threshold: 455ms
amazon:// : 437ms
ftp:// : 853ms
geo:// : 400ms
instagram:// : 392ms
mailto:// : 2527ms
ms-edge:// : 401ms
ms-store:// : 441ms
onenote:// : 952ms
skype:// : 395ms
slack:// : 901ms
sms:// : 470ms
spotify:// : 886ms
steam:// : 834ms
tel:// : 1619ms
twitch:// : 474ms
twitter:// : 455ms
whatsapp:// : 406ms
zoommtg:// : 873ms
'''
No user interaction is required for this leak. I'm attaching poc_img.html, but the behavior is the same when deployed on a server.

Have you become a bit tired of me reporting similar vulnerabilities every time? I apologize ;(

The original report as published on Mozilla's Bugzilla, by Satoki Tsuji. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 browser's handling of external protocol handlers introduces a measurable delay before firing the image error event, and this timing difference is observable by JavaScript.

Impact

An attacker could fingerprint which applications are installed on a visitor's system, potentially aiding further targeted attacks, though the text does not specify the browser or any defences.

What the attacker needed

Victim visits a malicious page; JavaScript enabled

How it was found

  1. Create an image element with a source URL using a custom protocol scheme.
  2. Record the time when loading starts.
  3. Listen for the error event and record the time when it fires.
  4. Compare the elapsed time against a threshold to infer whether a handler is installed.

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.

When a web page tries to load an image from a special link like 'mailto:' or 'slack:', the browser checks if an app is installed to handle that link. If an app is installed, the browser takes a bit longer to give up and show an error. By timing how long that error takes, a website can guess which apps you have installed, without you clicking anything.

What is Info disclosure?

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

More by Satoki Tsuji

View all

8 more disclosed reports, best first.

More from Mozilla

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.