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

Inappropriate implementation in Paint (CVE-2026-13972)

A logic error in Blink's hit-testing for 3D contexts allows overflow controls to unconditionally overwrite the shared z-offset during depth sorting. This enables visually occluded elements to be incorrectly reported as the frontmost element by security mechanisms like IntersectionObserver v2, potentially bypassing clickjacking protections in Page Embedded Permission Controls (PEPC).

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 46 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 3D contexts allows overflow controls to unconditionally overwrite the shared z-offset during depth sorting. This enables visually occluded elements to be incorrectly reported as the frontmost element by security mechanisms like IntersectionObserver v2. An attacker can leverage this to bypass clickjacking protections in Page Embedded Permission Controls (PEPC).

Affected files:

  • third_party/blink/renderer/core/paint/paint_layer.cc
  • third_party/blink/renderer/core/intersection_observer/intersection_geometry.cc
  • third_party/blink/renderer/core/html/html_capability_element_base.cc

Estimated timestamp from git blame: 2025-07-21

Summary

A vulnerability in PaintLayer::HitTestLayer for preserve-3d contexts allows an attacker to bypass occlusion detection. This is caused by an unconditional overwrite of the shared z-offset pointer during the hit-testing of overflow controls (such as scrollbars or resizers). As a result, elements that are visually occluded can be incorrectly identified as the frontmost element by IntersectionObserver v2 and the Page Embedded Permission Control (PEPC), potentially facilitating clickjacking attacks.

Root Cause Analysis

In PaintLayer::HitTestLayer, depth-sorting in 3D contexts is managed using a shared z_offset pointer, which acts as a running maximum. Each hit candidate is expected to compute its Z-offset and only update the shared *z_offset if its own depth is greater (closer to the viewer) than the current value.

While foreground and background hit-test paths generally follow this protocol, the overflow-controls path in third_party/blink/renderer/core/paint/paint_layer.cc does not:

C++
if (scrollable_area_ &&
    layer_fragments[0].background_rect.Intersects(recursion_data.location) &&
    GetLayoutBox()->HitTestOverflowControl(result, recursion_data.location, layer_fragments[0].layer_offset)) {
  if (z_offset && local_transform_state) {
    *z_offset = ComputeZOffset(*local_transform_state); // Potential Unconditional Write
  }
  return this;
}

There are two primary defects here:

  1. Unconditional Clobbering: The *z_offset is overwritten even if the new z-offset is lower (further away) than the previously recorded maximum. This destroys the running maximum for the 3D rendering context, allowing visually hidden elements to incorrectly 'win' the depth sort.
  2. Inconsistent Coordinate Basis: The path uses local_transform_state instead of container_transform_state. In modern Blink versions where HitTestContainerTransformStateForPreserve3d is enabled, this can lead to precision issues or incorrect Z-values when comparing against siblings.

Potential Impact

An attacker could position a scrollable element with a negative Z-transform such that its overflow controls overlap the center of a target element (e.g., a <permission> element). This would clobber the z_offset of any frontmost occluder. Consequently, the target element (which is visually behind the occluder) will win the hit-test because its Z-offset (e.g., 0) is greater than the clobbered value (e.g., -1).

This bypasses security primitives that rely on hit-testing for occlusion detection:

  • PEPC Anti-Clickjacking: The occlusion check may fail to detect an opaque overlay, delivering a click to the underlying permission element.
  • IntersectionObserver v2: The isVisible property may incorrectly report occluded elements as visible.

Suggested Reproductions Steps (Potential)

  1. Create a transform-style: preserve-3d container.
  2. Add an opaque Occluder (X) at Z=1.
  3. Add a Target element (T) at Z=0 (e.g., <permission type="camera">).
  4. Add a Clobberer (A) at Z=-1 with resize: both and overflow: scroll, positioned so its resizer overlaps T.
  5. Ensure the DOM/Paint order is T, A, then X.
  6. A hit-test at T's location will first find X (Z=1), then A will clobber the shared offset to -1, and finally T (Z=0) will win the depth sort against -1.

Recommended Fix

Modify the overflow controls path in PaintLayer::HitTestLayer to use the IsHitCandidateForDepthOrder logic or a manual comparison to ensure *z_offset is only updated if the new Z-offset is strictly greater than the current value. Additionally, use container_transform_state when appropriate to maintain coordinate consistency.

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.

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

The overflow-controls path in PaintLayer::HitTestLayer unconditionally overwrites the shared z-offset pointer instead of only updating it when the new depth is greater, breaking the running maximum used for depth sorting.

Impact

An attacker could bypass clickjacking protections in Page Embedded Permission Controls and cause IntersectionObserver v2 to incorrectly report occluded elements as visible, potentially leading to unauthorised permission grants.

What the attacker needed

Victim visits a crafted page; victim interacts with a permission element

The fix

The overflow controls path should be modified to only update the shared z-offset when the new value is strictly greater, and to use container_transform_state for coordinate consistency.

How it was found

  1. Create a container with transform-style: preserve-3d.
  2. Add an opaque occluder element at Z=1.
  3. Add a target element (e.g., a permission element) at Z=0.
  4. Add a clobberer element at Z=-1 with resize and overflow, positioned so its resizer overlaps the target.
  5. Ensure the DOM/paint order is target, clobberer, then occluder.
  6. Perform a hit-test at the target's location; the clobberer overwrites the shared z-offset, allowing the target to win the depth sort.

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 has elements stacked in 3D, the browser must decide which element is on top when you click. A mistake in that decision-making code lets a hidden element be treated as if it were in front, so a click meant for a visible button could go to something else. This could let an attacker trick you into granting permissions like camera access.

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.