Inappropriate implementation in Paint (CVE-2026-13988)
A hit-testing logic error in Blink causes elements with border-radius to return early during occlusion checks, bypassing visual overflow checks. An attacker could hide a permission element behind an opaque box-shadow so it is marked visible, allowing a user click on the shadow to interact with the hidden permission prompt.
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 hit-testing logic error in Blink allows elements with 'border-radius' to incorrectly return early during hit tests, bypassing visual overflow checks. This flaw can be exploited to hide sensitive elements like Permission elements behind opaque box-shadows without being detected as occluded.
Affected files:
third_party/blink/renderer/core/paint/box_fragment_painter.ccthird_party/blink/renderer/core/layout/layout_replaced.cc
Estimated timestamp from git blame: 2018-09-12
Summary
A potential order-of-operations vulnerability exists in Blink's hit-testing implementation within BoxFragmentPainter::NodeAtPoint and LayoutReplaced::NodeAtPoint. When a hit test is performed with the kHitTestVisualOverflow flag (primarily used by IntersectionObserver V2 and Page Embedded Permission Control), the presence of a border-radius on an occluding element can cause the hit test to return false prematurely. This allows visual overflow, such as box-shadow, to occlude a target without being detected by the security mechanisms designed to prevent clickjacking.
Root Cause Analysis
In third_party/blink/renderer/core/paint/box_fragment_painter.cc, the NodeAtPoint function contains the following logic:
// Check border-shape and border-radius clipping.
if (style.HasBorderShape()) {
// ... early return logic
} else if (style.HasBorderRadius() &&
HitTestClippedOutByBorder(hit_test.location, physical_offset)) {
return false; // Vulnerable early return
}
// ... later, visual overflow is evaluated
if (hit_test.result->GetHitTestRequest().IsHitTestVisualOverflow()) {
bounds_rect = InkOverflowIncludingFilters();
// ...
}
When HitTestForOcclusion is called, it sets the kHitTestVisualOverflow flag to ensure that non-layout visual elements like shadows are considered occluders. However, if the occluding element has a border-radius, HitTestClippedOutByBorder is called. If the hit-test point lies outside the rounded border box (even if it lies within the shadow), the function returns false at line 2366. This bypasses the logic at line 2403 that would have expanded the hit area to include the box-shadow via InkOverflowIncludingFilters().
Potential Attack Scenario
An attacker could potentially trigger this vulnerability to bypass the security checks of the <permission> element (PEPC) or any feature relying on IntersectionObserver visibility tracking:
- Place a sensitive element (e.g.,
<permission type="geolocation">) on a page. - Create a sibling 'occluder' element positioned slightly offset from the target.
- Apply
border-radius: 1pxand a large, opaquebox-shadowto the occluder such that the shadow completely covers the target element. - Blink's occlusion detection (via
HitTestForOcclusion) will traverse to the occluder but returnfalsedue to the border-radius early-return bug. - The sensitive element will be marked as
isVisible: truedespite being visually hidden by the shadow. - A user clicking the opaque shadow will unknowingly interact with the hidden permission element, potentially granting the site sensitive permissions.
Suggested Fix
The early return checks for border-radius and border-shape in NodeAtPoint should be bypassed if the kHitTestVisualOverflow flag is present in the HitTestRequest. This ensures that the hit test proceeds to evaluate the full ink overflow rect, including shadows and filters.
Note: These are potential steps and analysis based on code review; a functional proof-of-concept has not yet been executed.
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 hit-test function returns false early when a border-radius clips the hit point, skipping the later check that would include box-shadow overflow when the visual-overflow flag is set.
Impact
An attacker could potentially bypass clickjacking protections and trick a user into granting sensitive permissions, though no functional proof-of-concept has been executed.
What the attacker needed
Victim clicks on the shadow; page uses permission element or IntersectionObserver V2
The fix
The early return checks for border-radius and border-shape should be bypassed when the visual-overflow hit-test flag is present, so the full ink overflow rect is evaluated.
How it was found
- Place a sensitive permission element on a page.
- Create a sibling occluder element positioned slightly offset from the target.
- Apply a small border-radius and a large opaque box-shadow to the occluder so the shadow covers the target.
- Blink's occlusion detection returns false due to the border-radius early return.
- The sensitive element is marked visible despite being hidden by the shadow.
- A user clicking the shadow unknowingly interacts with the hidden permission element.
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 checks whether something is visible, it sometimes asks the browser to test if another element is covering it. This report found that if the covering element has rounded corners, the browser can wrongly say it is not covering anything. That means a hidden button could still be clicked, which is dangerous if the button asks for sensitive permissions.
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.