Skip to content
UI spoofing Advisory Intermediate CVE-2024-9958

Inappropriate implementation in PictureInPicture (CVE-2024-9958)

The Document Picture-in-Picture API allows an always-on-top window that can obscure a file save/open dialog opened from a different browser window. An attacker could position a pop-up to force the dialog behind the PiP window, tricking the user into saving or opening a file at an arbitrary path.

Lyra Rebane Follow

Originally disclosed on Chrome VRP

Bounty$5,000 Medium View original
  • Fix shipped in 11 months

VULNERABILITY DETAILS
The Document Picture-in-Picture API can be used to spawn an always on-top window that covers up anything behind it. When a file save/open dialog is opened from a PiP window, the dialog gets correctly displayed on top of it, but when a different browser window opens the file dialog it'll appear behind the PiP window.

By cleverly positioning a pop-up it is possible to force the file dialog to spawn behind the PiP window, completely obscured. Since the dialog still receives focus, it's possible to trick the user into saving or opening a file at an arbitrary file path.

In addition, the file write will appear to not open the downloads bubble since the bubble that does open is a part of the pop-up window that's completely obscured.

VERSION
Chrome Version: 119.0.6045.106 Stable + Dev
Operating System: Windows 10

REPRODUCTION CASE
The repro currently assumes that you've set your downloads to ask the path every time - this could be worked around by using the File System API.
The paths used are defined by the fileWritePath and fileReadPath variables respectively.

  1. Open the poc.html file in the browser
  2. Click the button
  3. Choose whether you want to see a file read or write and press the corresponding button
  4. Press the keys as instructed
  5. A file will be read or written

I've also included a demo video showing both the read and the write repros.

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: Lyra Rebane (rebane2001)

The original report as published on the Chromium issue tracker, by Lyra Rebane (rebane2001). 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 browser does not ensure that file dialogs are always displayed above all other windows, including always-on-top Picture-in-Picture windows.

Impact

An attacker could trick a user into saving or opening a file at an arbitrary path, potentially leading to file overwrite or data disclosure, though the exploit requires the user to interact with the obscured dialog.

What the attacker needed

User interaction with a crafted page; downloads set to ask for path each time

How it was found

  1. Open the poc.html file in the browser
  2. Click the button
  3. Choose whether you want to see a file read or write and press the corresponding button
  4. Press the keys as instructed
  5. A file will be read or written

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.

A browser feature that lets a small video window stay on top of other windows can be abused. When a file dialog opens from another window, it can appear behind this always-on-top window, so the user cannot see it. An attacker can then trick the user into saving or opening a file without realising 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 by Lyra Rebane

View all

7 more disclosed reports, best first.

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.