Skip to content
UI spoofing Advisory Advanced CVE-2026-14014

Inappropriate implementation in Paint (CVE-2026-14014)

A hit-testing branch in Chromium's paint code for CSS border-shape returns false without checking whether the request is a visual-overflow query, unlike the equivalent border-radius branch. This could let an attacker cover a permission prompt or observed element with a shadow while the engine still reports the target as visible, potentially enabling clickjacking to grant permissions.

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 logic flaw in BoxFragmentPainter::NodeAtPoint's handling of CSS border-shape allows layerless elements with decorative outsets to bypass occlusion detection. When checking border-shape, the hit-testing branch immediately returns false without verifying if the request is checking visual overflow. This enables an attacker to visually obscure a target Page-Embedded Permission Control (PEPC) or IntersectionObserver-tracked element with a shadow while the engine incorrectly reports it as fully visible.

Affected files:

  • third_party/blink/renderer/core/paint/box_fragment_painter.cc

Estimated timestamp from git blame: 2026-01-29

Root Cause Analysis

There is a potential asymmetric logic flaw in BoxFragmentPainter::NodeAtPoint inside third_party/blink/renderer/core/paint/box_fragment_painter.cc when handling the CSSBorderShape feature compared to standard border-radius corners.

When standard border-radius clipping is processed, an early return of false (meaning the point is clipped out by the border) is gated on whether the hit-test request is querying visual overflow (IsHitTestVisualOverflow()). This ensures that decorative outsets (such as box-shadow or filters) are properly evaluated during occlusion/visibility tests.

However, the border-shape sibling block does not perform this check. When the hit-test location is outside the border-shape outer path (which represents the physical border box bounds and does not account for visual overflow), the function immediately returns false unconditionally.

Below is the relevant code structure in third_party/blink/renderer/core/paint/box_fragment_painter.cc:

C++
  // Check border-shape and border-radius clipping.
  if (style.HasBorderShape()) {
    PhysicalRect rect(physical_offset, size);
    const Path outer_path = ComputeBorderShapeOuterPath(
        style, rect, box_fragment_.GetLayoutObject());
    if (!hit_test.location.Intersects(outer_path)) {
      return false; // Potential unconditional early return bypasses IsHitTestVisualOverflow()
    }
  } else if (style.HasBorderRadius() &&
             HitTestClippedOutByBorder(hit_test.location, physical_offset)) {
    if (!hit_test.result->GetHitTestRequest().IsHitTestVisualOverflow()) { // Correctly gated
      return false;
    }
  }

If a visibility or occlusion hit-test (which utilizes IsHitTestVisualOverflow()) occurs, and the location falls within the element's visual overflow (such as a large box-shadow or negative-offset spread) but outside its actual physical border shape, the unconditional return false short-circuits NodeAtPoint. This prevents execution from reaching the self hit-test logic that would otherwise expand the bounding box using InkOverflowIncludingFilters() and register the overlap.

Potential Impact

An attacker could potentially exploit this behavior to perform a clickjacking attack on a primary security surface. By overlaying a layerless, static inline-block element styled with border-shape and a large spread/offset box-shadow, they can visually cover a Page-Embedded Permission Control (PEPC) element (e.g. <permission> or <geolocation>) or an element monitored via IntersectionObserver (V2).

Because the occlusion detection hit-test incorrectly returns false (no overlap), the target element is reported as fully visible and unoccluded. This keeps the PEPC element clickable and enabled, allowing the attacker to trick the user into clicking on the obscuring shadow and inadvertently granting sensitive browser permissions.

Suggested Technical Steps to Trigger (Potential)

(Note: These are suggested/potential steps; our tooling currently does not have the ability to run code or execute a live proof of concept).

  1. Serve a page containing a target PEPC element (e.g. <permission type="geolocation">) and a layerless in-flow sibling element designed to overlap it via a visual shadow outset:

    HTML
    <permission type="geolocation"></permission>
    <span style="display:inline-block; width:2px; height:2px; border-shape:circle; box-shadow:-140px 0 0 140px black;"></span>
    
  2. Monitor the target element using an IntersectionObserver configured with {trackVisibility: true, delay: 100} or click interaction states.

  3. The black shadow completely covers the permission button, yet the browser's occlusion check evaluates the target's visibility status as isVisible: true.

  4. If standard border-radius: 1px is used instead of border-shape: circle, the occlusion check correctly identifies the shadow overlap and changes visibility to false (confirming that the bypass is unique to the border-shape path).

Proposed Remediation

Align the border-shape clipping branch logic with the border-radius branch by gating the early return on whether the request is querying visual overflow:

C++
  // Check border-shape and border-radius clipping.
  if (style.HasBorderShape()) {
    PhysicalRect rect(physical_offset, size);
    const Path outer_path = ComputeBorderShapeOuterPath(
        style, rect, box_fragment_.GetLayoutObject());
    if (!hit_test.location.Intersects(outer_path)) {
      if (!hit_test.result->GetHitTestRequest().IsHitTestVisualOverflow()) {
        return false;
      }
    }
  } else if (style.HasBorderRadius() && ...

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.

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 border-shape clipping branch in BoxFragmentPainter::NodeAtPoint returns false without gating on IsHitTestVisualOverflow(), so visual overflow such as box-shadow is never considered, unlike the border-radius branch.

Impact

An attacker could potentially trick a user into clicking an obscured permission control and inadvertently granting sensitive browser permissions; the report notes no live proof of concept was run.

What the attacker needed

Victim visits attacker page; victim clicks the obscured control; browser supports border-shape

The fix

The border-shape branch should gate its early return on IsHitTestVisualOverflow(), matching the border-radius branch; the text does not say it was fixed.

How it was found

  1. Serve a page with a target permission element and a layerless inline-block sibling styled with border-shape and a large box-shadow that overlaps it.
  2. Observe the target with an IntersectionObserver using trackVisibility, or check its click interaction state.
  3. Note that the shadow fully covers the permission control yet the occlusion check reports the target as visible.
  4. Repeat with border-radius instead of border-shape to confirm the overlap is then correctly detected.

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 browser decides whether one element is hidden behind another, it runs a hit test: it asks which element is at a given point. Here, for elements styled with a newer CSS border-shape feature, that check stops early and says 'nothing here' even though a large shadow drawn by the element does cover the point. The result is that a permission button underneath the shadow is still treated as visible and clickable, so a user could be tricked into clicking it.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Clickjacking and UI spoofing

The lesson behind this report.

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.