Inappropriate implementation in Paint (CVE-2026-13979)
A logic error in Blink's hit-testing for SVG text elements with pointer-events: bounding-box causes filter-expanded visual bounds to be ignored during occlusion checks. An attacker could potentially create opaque overlays that spoof sensitive UI components, such as the permission element, without being detected by clickjacking protections.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 45 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 logic error in Blink's hit-testing for SVG text elements causes filter-expanded visual bounds to be ignored during occlusion checks. This allows attackers to potentially create opaque overlays that spoof sensitive UI components, such as the permission element, without being detected by clickjacking protections. The issue impacts both the Permission Element and IntersectionObserver V2 trackVisibility.
Affected files:
third_party/blink/renderer/core/paint/box_fragment_painter.ccthird_party/blink/renderer/core/layout/svg/layout_svg_root.ccthird_party/blink/renderer/core/layout/svg/layout_svg_text.ccthird_party/blink/renderer/core/layout/layout_object.ccthird_party/blink/renderer/core/html/html_capability_element_base.cc
Estimated timestamp from git blame: 2021-06-29
Summary
A potential vulnerability has been identified in Blink's hit-testing logic where SVG <text> elements with the CSS property pointer-events: bounding-box incorrectly calculate their visual area during occlusion checks (HitTestForOcclusion). When a hit-test request includes the kHitTestVisualOverflow flag (used by security-sensitive features like the Permission Element anti-clickjacking and IntersectionObserver V2), the system correctly identifies expanded bounds including filters but then unconditionally overwrites them with the object's base bounding box. This allows an attacker to use CSS filters (like drop-shadow or feFlood) to create opaque overlays that are invisible to the occlusion detection system.
Technical Details
In BoxFragmentPainter::NodeAtPoint, when processing an SVG <text> fragment with pointer-events: bounding-box, the following occurs:
- At line 2410, if the hit-test request is for visual overflow (
IsHitTestVisualOverflow()), the code correctly expands thebounds_rectusingInkOverflowIncludingFilters(). - Immediately following this, at line 2415, the code checks if
pointer_events_bounding_boxis set. If true, it unconditionally resetsbounds_recttoObjectBoundingBox(), effectively discarding any expansion provided by filters.
Furthermore, LayoutSVGRoot::ComputeContentsVisualOverflow relies on DecoratedBoundingBox(), which for SVG text and shapes does not include filter outsets. This can cause the hit-test engine to skip an entire SVG subtree if the test point only intersects a filter-expanded area, as the root's visual overflow rect is insufficiently sized.
Potential Attack Scenario (PEPC Bypass)
An attacker could potentially trick a user into granting sensitive permissions (camera, microphone, geolocation) by visually spoofing the <permission> element:
- The attacker places a
<permission type="camera">element (PEPC). - An absolutely-positioned
<svg>is placed over the permission element withpointer-events: noneandvisibility: hidden(to bypass the root's own hit-test while allowing child testing). - Inside the SVG, a
<text>element is added withpointer-events: bounding-boxand a filter likedrop-shadow(...)that projects an opaque silhouette over the permission button. - Because of the bug in
NodeAtPointand the root overflow calculation, the occlusion hit-test ignores the shadow. IntersectionObserverreports the permission element as fully visible, and the element becomes click-enabled after the security delay.- A user click on the spoofed area passes through the SVG and triggers the permission prompt.
Note: These steps are suggested based on code analysis; our current environment does not support executing a live proof-of-concept.
Suggested Fix
- In
BoxFragmentPainter::NodeAtPoint, the override forpointer_events_bounding_boxshould union theObjectBoundingBox()with the existingbounds_rectifIsHitTestVisualOverflow()is set, rather than unconditionally replacing it. - Update
LayoutSVGText::DecoratedBoundingBox(and potentially other SVG layout objects) to include filter outsets when requested, or ensureLayoutSVGRootaccounts for filters in its contents visual overflow calculation to prevent premature subtree culling.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
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 code unconditionally resets the hit-test bounds to the object's base bounding box after expanding them for filters, discarding the filter expansion.
Impact
An attacker could potentially trick a user into granting sensitive permissions (camera, microphone, geolocation) by visually spoofing the permission element, though the report notes that a live proof-of-concept was not executed.
What the attacker needed
Victim visits attacker-controlled page; victim clicks on spoofed permission element
The fix
The override for pointer_events_bounding_box should union the ObjectBoundingBox() with the existing bounds_rect if IsHitTestVisualOverflow() is set, rather than unconditionally replacing it, and SVG layout objects should include filter outsets in their decorated bounding box.
How it was found
- Place a permission element on the page.
- Overlay an absolutely positioned SVG with pointer-events: none and visibility: hidden.
- Add a text element inside the SVG with pointer-events: bounding-box and a filter that creates an opaque silhouette.
- The occlusion hit-test ignores the shadow due to the bug.
- IntersectionObserver reports the permission element as fully visible, enabling it after a delay.
- A user click on the spoofed area triggers the permission prompt.
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 asks for permission to use your camera or microphone, the browser tries to make sure nothing is covering the permission button, so you can't be tricked into clicking something else. This report found a bug where a specially crafted image with a shadow could cover the button without the browser noticing. That could let an attacker make you think you're clicking the real button when you're actually clicking their fake one.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.