Skip to content
Info disclosure Advisory Advanced CVE-2026-79193

Information leak in Canvas (CVE-2026-79193)

A cross-origin image's EXIF orientation tag could be leaked through a paint-timing side channel because Blink failed to clamp orientation for CSSImageValue sources drawn to a canvas. An attacker could potentially distinguish whether an image was rotated and infer its orientation tag.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 3 months

Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A potential vulnerability in Canvas2D allows cross-origin EXIF orientation tags to be leaked via a paint-timing side channel. When drawing a cross-origin, no-CORS image using a CSSImageValue source onto a canvas with image-orientation: none, Blink fails to clamp the EXIF orientation. This allows an attacker to potentially distinguish whether an image has been rotated and leak its orientation tag.

Affected files:

  • third_party/blink/renderer/modules/canvas/canvas2d/canvas_2d_recorder_context.cc
  • third_party/blink/renderer/core/css/cssom/css_style_image_value.h

Estimated timestamp from git blame: 2020-11-06

Description

To prevent leaking metadata of cross-origin, opaque (no-CORS) images, the browser must enforce standard image orientation (kRespectImageOrientation) regardless of CSS styling (such as image-orientation: none).

In Canvas2D rendering, Canvas2DRecorderContext::RespectImageOrientationInternal is responsible for overriding the image orientation behavior for cross-origin sources to prevent orientation leaks.

Root Cause

The implementation of RespectImageOrientationInternal uses a hard-coded closed list of source types (IsImageBitmap and IsImageElement) and completely omits CSSStyleImageValue:

C++
// File: third_party/blink/renderer/modules/canvas/canvas2d/canvas_2d_recorder_context.cc
RespectImageOrientationEnum
Canvas2DRecorderContext::RespectImageOrientationInternal(
    CanvasImageSource* image_source) {
  if ((image_source->IsImageBitmap() || image_source->IsImageElement()) &&
      image_source->WouldTaintOrigin()) {
    return kRespectImageOrientation;
  }
  return RespectImageOrientation();
}

CSSStyleImageValue (the underlying C++ implementation for the CSSImageValue IDL interface) implements CanvasImageSource, but inherits the default implementations of IsImageElement() and IsImageBitmap() which return false (defined in third_party/blink/renderer/core/html/canvas/canvas_image_source.h).

Consequently, when drawing a CSSStyleImageValue source, the override condition evaluates to (false || false) && true, which is false. Blink then falls back to RespectImageOrientation(), which respects the canvas element's author-controlled image-orientation CSS style property. This allows raw, unrotated pixels to be drawn to the canvas when image-orientation: none is set.

While drawing taints the canvas origin and blocks read-back APIs like getImageData, the differential between the unrotated raw image paint and standard orientation paints is observable via timing-based paint side channels.

Potential Attack Vector / Trigger Path

Note: These are potential steps as our tooling does not yet have the ability to run proof-of-concept code.

  1. Load Target Image: An attacker loads a cross-origin, no-CORS image (e.g., via background-image CSS style). Once loaded, the attacker fetches its CSSImageValue representation using the Typed OM computedStyleMap().get('background-image') API.
  2. Set Orientation to None: The attacker sets imageOrientation = 'none' on a canvas element.
  3. Draw CSSImageValue: The attacker draws the CSSImageValue onto the canvas via ctx.drawImage(cssImageValue, 0, 0). Because the source is not recognized as restricted, the clamp is bypassed and the raw unrotated decode is drawn.
  4. Measure Difference: By comparing this canvas to a canvas drawn with default orientation using a paint-timing side channel (e.g., stacking both with mix-blend-mode: difference under an expensive SVG filter and measuring rendering times via requestAnimationFrame), the EXIF orientation tag of the target image is leaked.

Suggested Fix

Update RespectImageOrientationInternal to include CSSStyleImageValue in the check, or more simply, enforce kRespectImageOrientation for any cross-origin resource that can taint the origin and has orientation properties. For example:

C++
RespectImageOrientationEnum
Canvas2DRecorderContext::RespectImageOrientationInternal(
    CanvasImageSource* image_source) {
  if (image_source->WouldTaintOrigin() &&
      !image_source->IsCanvasElement() &&
      !image_source->IsOffscreenCanvas()) {
    return kRespectImageOrientation;
  }
  return RespectImageOrientation();
}

Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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

The orientation-clamping check used a hard-coded list of source types that omitted CSSStyleImageValue, so cross-origin CSSImageValue sources fell back to the author-controlled image-orientation style.

Impact

The EXIF orientation tag of a cross-origin image could potentially be leaked, though the canvas is tainted and read-back APIs like getImageData remain blocked.

What the attacker needed

Victim visits attacker page; target image is cross-origin and no-CORS; browser supports Typed OM and canvas drawImage

The fix

The check should be updated to include CSSStyleImageValue, or to enforce kRespectImageOrientation for any cross-origin resource that can taint the origin and has orientation properties.

How it was found

  1. Load a cross-origin, no-CORS image and obtain its CSSImageValue via computedStyleMap().get('background-image').
  2. Set imageOrientation = 'none' on a canvas element.
  3. Draw the CSSImageValue onto the canvas with ctx.drawImage.
  4. Compare against a canvas drawn with default orientation using a paint-timing side channel to infer the EXIF orientation tag.

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 website loads an image from another site, the browser normally hides extra details like the photo's rotation tag to protect privacy. Here, a specific way of drawing that image onto a canvas skipped that protection, so a malicious page could measure tiny timing differences to guess the hidden rotation. This is a privacy leak, not a way to take over accounts.

What is Info disclosure?

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

More from Google Chrome

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.