Skip to content
Info disclosure Write-up Advanced

Guest Blog Post: Leaking silhouettes of cross-origin images

A timing side channel in the image-drawing code of Chromium and Firefox let a malicious page infer the transparency of each pixel in a cross-origin image. An attacker could therefore reconstruct a silhouette of the image, enough to read text drawn on a transparent background.

Aleksejs Popovs Follow

Published on blog.mozilla.org

This is a writeup of a vulnerability I found in Chromium and Firefox that could allow a malicious page to read some parts of an image located on an origin it is not supposed to be able to access. Although technically interesting, it is quite limited in scope—I am not aware of any major websites it could’ve been used…

Aleksejs Popovs (@aleksejspopovs), on blog.mozilla.org

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

Impact

A malicious page could read the silhouette of a cross-origin image, but only when CPU rendering is used, since GPU acceleration showed no timing difference; the author notes it is limited in scope.

What the attacker needed

Victim visits a malicious page; CPU rendering in use (no GPU acceleration); target image embeddable cross-origin

How it was found

  1. Create a canvas and get its 2D drawing context.
  2. For a chosen pixel, repeatedly draw that single pixel scaled up to a large size onto the canvas.
  3. Wait briefly so the browser actually performs the queued drawing.
  4. Measure the elapsed time and repeat for every pixel.
  5. Render the timings as a heatmap to reveal the image's silhouette.

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.

Websites are normally not allowed to read images from other sites, only to display them. The browser draws images faster or slower depending on whether a pixel is see-through, solid or partly see-through, and a page can measure that time. By timing every pixel, a malicious page can work out the shape of an image it should not be able to read.

What is Info disclosure?

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

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.