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

Observable discrepancy in SVG (CVE-2026-79016)

Blink's SVG filter builder creates the builtin FillPaint, StrokePaint and SourceAlpha filter effects without carrying over the origin-taint flag, and the feDisplacementMap filter only checks its second input for taint. An attacker could therefore feed cross-origin pixels into a displacement map and infer their values from rendering time differences.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 5 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: Blink's SVG filter implementation potentially fails to propagate origin-taint status to builtin filter inputs like FillPaint, StrokePaint, and SourceAlpha. This oversight allows an attacker to bypass security restrictions on the <feDisplacementMap> filter intended to prevent timing side-channel attacks. By using a tainted canvas pattern as FillPaint for a displacement map, an attacker could extract cross-origin pixel data by measuring rendering time variations.

Affected files:

  • third_party/blink/renderer/core/svg/graphics/filters/svg_filter_builder.cc
  • third_party/blink/renderer/platform/graphics/filters/fe_displacement_map.cc
  • third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_state.cc
  • third_party/blink/renderer/core/paint/filter_effect_builder.cc
  • third_party/blink/renderer/platform/graphics/filters/paint_filter_effect.cc
  • third_party/blink/renderer/platform/graphics/filters/source_alpha.cc

Estimated timestamp from git blame: 2020-02-18

Summary

A potential vulnerability in Blink's SVG filter building logic allows an attacker to bypass the origin-taint check in the feDisplacementMap filter. This issue re-enables a timing side-channel attack where cross-origin pixel values can be extracted by observing variations in rendering performance, bypassing the defense originally implemented for crbug.com/778506.

Root Cause Analysis

The vulnerability stems from two related issues:

  1. Untainted Builtin Filter Effects: In SVGFilterBuilder::SVGFilterBuilder() (third_party/blink/renderer/core/svg/graphics/filters/svg_filter_builder.cc), the builtin effects for FillPaint, StrokePaint, and SourceAlpha are created without propagating any origin-taint status:

    C++
    builtin_effects_.insert(FilterInputKeywords::SourceAlpha(),
                            MakeGarbageCollected<SourceAlpha>(source_graphic));
    if (fill_flags) {
      builtin_effects_.insert(FilterInputKeywords::FillPaint(),
                              MakeGarbageCollected<PaintFilterEffect>(
                                  source_graphic->GetFilter(), *fill_flags));
    }
    

    The FilterEffect base class defaults origin_tainted_ to false. While the canvas context may be tainted (e.g., by setting fillStyle to a cross-origin CanvasPattern), and SourceGraphic is correctly marked as tainted, the newly created PaintFilterEffect objects for FillPaint and StrokePaint are never explicitly marked as tainted. Consequently, their OriginTainted() methods incorrectly return false.

  2. Incomplete Security Check in FEDisplacementMap: The Filter Effects Module Level 1 specification requires feDisplacementMap to act as a pass-through filter if either the first or second input is origin-tainted to prevent timing attacks. However, in FEDisplacementMap::CreateImageFilter() (third_party/blink/renderer/platform/graphics/filters/fe_displacement_map.cc), the implementation only checks the second input:

    C++
      // FEDisplacementMap must be a pass-through filter if
      // the origin is tainted. See:
      // https://drafts.fxtf.org/filter-effects/#fedisplacemnentmap-restrictions.
      if (InputEffect(1)->OriginTainted())
        return color;
    

    It misses the check for InputEffect(0)->OriginTainted().

Exploitation Scenario

If an attacker sets canvas.fillStyle to a cross-origin CanvasPattern and applies an SVG filter containing an <feDisplacementMap> element with in2="FillPaint", the cross-origin shader is carried into the FillPaint effect. Because FillPaint is incorrectly considered untainted, the security check in FEDisplacementMap is bypassed. The filter proceeds to use cross-origin pixel values as displacement vectors.

An attacker can perform a pixel-by-pixel extraction of cross-origin image content by measuring the time it takes to render a canvas with the displacement filter applied. Rendering timing varies depending on the displacement distance (driven by the victim pixel values), allowing for an information leak of cross-origin data (CWE-200).

Potential Reproduction Steps

Note: These are suggested steps to trigger the vulnerability. Tooling does not currently allow running arbitrary code to confirm the exploit.

  1. Host an attacker-controlled page with an inline SVG filter:

    XML
    <svg>
      <filter id="f">
        <feDisplacementMap in="SourceGraphic" in2="FillPaint" xChannelSelector="R" yChannelSelector="G" scale="500"/>
      </filter>
    </svg>
    
  2. Load a cross-origin image without CORS: img.src = 'https://victim.example/secret.png';

  3. Upon image load, create a pattern and set it as the canvas fillStyle (this taints the canvas context):

    JavaScript
    const ctx = canvas.getContext('2d');
    const p = ctx.createPattern(img, 'repeat');
    ctx.fillStyle = p;
    ctx.filter = 'url(#f)';
    
  4. Repeatedly call ctx.fillRect(0,0,1,1) while varying SourceGraphic probe patterns and measuring execution time using performance.now().

  5. The render timing will depend on the R/G channel values of the cross-origin image at the displacement point. An attacker can binary-search for specific pixel values based on these timing variations.

Suggested Fix

  1. Propagate Taint Status to Builtin Effects: Update the SVGFilterBuilder constructor to mark the SourceAlpha, FillPaint, and StrokePaint effects as tainted if the incoming source_graphic is tainted or if the context flags contain cross-origin data. Alternatively, ensure the PaintFilterEffect itself evaluates taint based on the provided flags.

  2. Enforce Complete Security Check: Correct the implementation in FEDisplacementMap::CreateImageFilter() to check both inputs as required by the specification:

    C++
    if (InputEffect(0)->OriginTainted() || InputEffect(1)->OriginTainted())
      return color;
    

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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

Likely the builtin filter effects are constructed with the default untainted state and the displacement map filter checks only its second input for taint, so the specification's pass-through rule is not enforced.

Impact

Cross-origin image pixels could be leaked through timing measurements, though the report notes the exploit was not actually run and confirmed.

What the attacker needed

Victim visits attacker page; cross-origin image without CORS; precise timing measurement

The fix

The builder should mark the builtin effects as tainted when the source graphic is tainted, and the displacement map should treat the filter as a pass-through when either input is tainted.

How it was found

  1. Put an SVG filter with a displacement map using FillPaint as its second input on an attacker page.
  2. Load a cross-origin image without CORS.
  3. Create a pattern from the image and set it as the canvas fill style, which taints the context.
  4. Repeatedly draw a small rectangle while varying the probe pattern and timing the call.
  5. Infer pixel values from the timing differences, for example by binary search.

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.

A web page can normally draw an image from another site into a canvas, but the browser then marks that canvas as 'tainted' so the page cannot read the pixels back. This report says a browser filter used for SVG graphics forgets to carry that tainted mark into some of its inputs, so a page could still learn about those hidden pixels by timing how long drawing takes.

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.