Insufficient policy enforcement in SVG (CVE-2026-14016)
A logic flaw in Blink's SVG filter invalidation lets a filter's colour change from an absolute colour to an unresolved colour function that depends on currentColor without rebuilding the filter chain, so the cached filter data keeps a stale origin-tainted flag of false. An attacker could then paint visited-dependent filtered pixels onto a canvas and read them back to learn whether a link has been visited.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 35 days
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 Blink's SVG filter invalidation logic allows visited-dependent color changes via unresolved color functions to bypass origin-taint checks. This occurs because transitions between absolute colors and unresolved color functions are handled via an in-place mutation fast path, which fails to re-evaluate the filter's origin-taint status. Consequently, an attacker could potentially render visited-dependent SVG filters onto a canvas element and extract user browsing history via standard pixel readback APIs.
Affected files:
third_party/blink/renderer/core/layout/svg/layout_svg_filter_primitive.cc
Estimated timestamp from git blame: 2019-03-07
Root Cause Analysis
In third_party/blink/renderer/core/layout/svg/layout_svg_filter_primitive.cc, the helper function CheckForColorChange is designed to determine if a dynamic change in an SVG filter primitive's color requires a full filter-chain rebuild (which propagates the origin_tainted_ flag) or if it can safely take a fast path via PrimitiveAttributeChanged:
static void CheckForColorChange(SVGFilterPrimitiveStandardAttributes& element,
const QualifiedName& attr_name,
StyleDifference diff,
const StyleColor& old_color,
const StyleColor& new_color) {
// If the <color> change from/to 'currentcolor' then invalidate the filter
// chain so that it is rebuilt. (Makes sure the 'tainted' flag is propagated.)
if (new_color.IsCurrentColor() != old_color.IsCurrentColor()) {
element.Invalidate();
return;
}
if (new_color != old_color || CurrentColorChanged(diff, new_color))
element.PrimitiveAttributeChanged(attr_name);
}
The issue is that StyleColor::IsCurrentColor() only returns true for the literal currentcolor keyword. However, unresolved color functions (e.g., color-mix(in srgb, currentColor 99%, black)) also depend on currentColor (making StyleColor::DependsOnCurrentColor() return true) but return false for IsCurrentColor() (see third_party/blink/renderer/core/css/style_color.h line 253).
As a result, a transition from an absolute color (like red) to an unresolved color function depending on currentColor evaluates new_color.IsCurrentColor() != old_color.IsCurrentColor() as false != false (which is false), bypassing the full invalidation branch (element.Invalidate()). Instead, it executes PrimitiveAttributeChanged, which performs an in-place mutation of the existing filter effect's color attribute without rebuilding the filter chain or re-evaluating TaintsOrigin(). This leaves the cached FilterData with a stale OriginTainted() == false flag.
Potential Impact and Bypass Mechanism
Because the cached FilterData retains a stale OriginTainted() == false status, it successfully bypasses both security gates designed to prevent visited-color exposure onto a canvas subtree:
- Canvas Subtree Filter Disallow Gate in
paint_property_tree_builder.cc(line 2422) wherefilter_info.operations.OriginTainted()is checked. - Privacy-Preserving Paint Gate in
scoped_svg_paint_state.cc(line 147) wherefilter->Filter()->OriginTainted()is checked underPaintFlag::kPrivacyPreserving.
Suggested Attack Steps
The following are potential steps an attacker might follow to trigger this vulnerability (note that our tooling agent does not currently have the ability to execute code, so these are analytical steps):
- Create a page with a target visited/unvisited link
<a>and style its visited and unvisited states with different colors. - Define an SVG filter containing a primitive such as
<feFlood>or<feDropShadow>initially styled with an absolute color (e.g.,flood-color: red;). - Cause the layout engine to render the filter onto an element (like a
<rect>) positioned inside a canvas subtree, establishing an initial cachedFilterDatawithOriginTainted() == false. - Dynamically update the primitive's style to an unresolved color function referencing
currentColor(e.g.,flood-color: color-mix(in srgb, currentColor 99%, black);), which inherits from the link. - The fast path
CheckForColorChangemutates the color in-place based on the visited state of the link but fails to mark the filter's operations as origin-tainted. - Paint the element onto a canvas. Since the filter is not stripped due to the stale taint status, the visited-dependent filtered pixels are drawn.
- Call
canvasContext.getImageData()to read the pixel values and determine if the link has been visited.
Suggested Fix
To fix this issue, CheckForColorChange should check if either the old or new color depends on currentColor by using DependsOnCurrentColor() rather than IsCurrentColor():
static void CheckForColorChange(SVGFilterPrimitiveStandardAttributes& element,
const QualifiedName& attr_name,
StyleDifference diff,
const StyleColor& old_color,
const StyleColor& new_color) {
// If the <color> dependency on 'currentcolor' changes, then invalidate the filter
// chain so that it is rebuilt. (Makes sure the 'tainted' flag is propagated.)
if (new_color.DependsOnCurrentColor() != old_color.DependsOnCurrentColor()) {
element.Invalidate();
return;
}
if (new_color != old_color || CurrentColorChanged(diff, new_color))
element.PrimitiveAttributeChanged(attr_name);
}
Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8
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.
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 colour-change check only tests for the literal currentcolor keyword and misses unresolved colour functions that also depend on currentColor, so the fast in-place mutation path runs without rebuilding the filter chain or re-evaluating origin taint.
Impact
An attacker could potentially extract a user's browsing history by reading canvas pixels, though the report notes the steps are analytical and were not executed.
What the attacker needed
Victim visits attacker page; target link in browsing history; browser supports SVG filters and canvas
The fix
The colour-change check should compare whether the old and new colours depend on currentColor rather than whether they are the literal keyword, so the filter chain is rebuilt and the taint flag propagated.
How it was found
- Create a page with a target link and style its visited and unvisited states with different colours.
- Define an SVG filter primitive initially styled with an absolute colour.
- Render the filter onto an element inside a canvas subtree so the cached filter data starts with origin taint false.
- Dynamically change the primitive's style to an unresolved colour function that references currentColor and inherits from the link.
- The fast path mutates the colour in place based on the visited state without marking the filter as origin-tainted.
- Paint the element onto a canvas and read the pixels back to determine whether the link was visited.
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.
Browsers deliberately hide whether you have visited a link, because that reveals your browsing history. This report describes a way an SVG filter could keep a stale 'not sensitive' label after its colour starts depending on the visited link colour, so the browser would draw the visited colour onto a canvas. A script could then read the canvas pixels and work out whether the link was visited.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.