Inappropriate implementation in Picture In Picture (CVE-2025-8577)
The Save As file dialog can be obscured behind a Picture-in-Picture window while still receiving keyboard focus, allowing an attacker to trick the user into saving a malicious file to an arbitrary path. This only works if the user has enabled the 'Ask where to save each file before downloading' setting.
Originally disclosed on Chrome VRP
- Fix shipped in 8 months
Steps to reproduce the problem
Enable Ask where to save each file before downloading in Downloads
- Open the poc.html file in the browser
- Click the button
- Click on Start file writing button
- Press the keys ctrl + v and keypress Enter key
A file will be written
Problem Description
Save as file dialog can steal focus behind the Picture-in-Picture API and can save malicious at arbitrary file path it is possible only if a user has enabled Ask where to save each file before downloading in Downloads
it is possible to saving malicious file at an arbitrary file path. the save as file dialog stays behind the PiP window, completely obscured. Since the dialog still receives focus, it's possible to trick the user into saving malicious file at any path
Additional Comments
Google Chrome 132.0.6834.46 (Official Build) beta (64-bit) (cohort: Beta) Revision c2f4d240db159da353deb230fea74b6a2f32533b-refs/branch-heads/6834@{#1946} OS Windows 10 Version 22H2 (Build 19045.5131)
Summary
Save As file dialog steal focus behind the PictureinPictureAPI save malicious file at arbitrary path
Custom Questions
Reporter credit:
Puf
Additional Data
Category: Security
Chrome Channel: Beta
Regression: N/A
Context
Picture-in-Picture (PiP) is a browser feature that lets a video keep playing in a small always-on-top window while the user navigates elsewhere. Because that window is meant to float above other content, it sits in a privileged position relative to ordinary page UI. This report concerns an inappropriate implementation in Chrome's PiP handling that lets a page place the Save As file dialog behind the PiP window, where the user cannot see it, while the dialog still holds focus.
The affected component is Picture In Picture in Google Chrome, reported through the Chrome VRP. The issue is tracked as CVE-2025-8577 and was rated medium severity, with a bounty of 1000.00 USD. It was disclosed on 2025-08-05. The reporter credit given in the report is Puf.
Setup
The behaviour depends on one user setting. The report states the precondition as:
Enable Ask where to save each file before downloading in Downloads
With that option on, Chrome shows a Save As dialog for each download instead of saving silently to the default location. The test environment recorded in the report is:
| Item | Value |
|---|---|
| Chrome | 132.0.6834.46 (Official Build) beta (64-bit) (cohort: Beta) |
| Revision | [redacted]-refs/branch-heads/6834@{#1946} |
| OS | Windows 10 Version 22H2 (Build 19045.5131) |
| Channel | Beta |
| Regression | N/A |
The report does not describe any accounts, roles or additional tooling beyond a local file named poc.html.
Finding it
The report states that the Save As file dialog can steal focus behind the Picture-in-Picture API. In other words, the dialog is raised and receives keyboard focus, but it is rendered behind the PiP window and is therefore completely obscured. Because the dialog still accepts input, a page can drive the user's keystrokes into it without the user seeing what is happening.
The report frames the consequence directly: it is possible to save a malicious file at an arbitrary file path, but only if the user has enabled Ask where to save each file before downloading in Downloads.
Exploitation
The reproduction is short and entirely local. The steps below follow the report exactly.
Step 1: Open the proof of concept
Open the poc.html file in the browser. The report does not include the contents of poc.html, so the page's markup and script are not reproduced here.
Step 2: Click the button
Click the button on the page. Click the button on the page.
Step 3: Start the file write
Click on the Start file writing button. Click on the Start file writing button.
Step 4: Send the keystrokes
Press the keys ctrl + v and then the Enter key. A file will be written.
The report lists the keystrokes without explaining what the paste inserts. The user sees nothing of this because the dialog is hidden behind the PiP window.
Root cause
The report describes the defect as an inappropriate implementation: the Save As file dialog can take focus while sitting behind the Picture-in-Picture window. The dialog is obscured but still receives focus, so keyboard input intended for, or simply typed by, the user is delivered to a control the user cannot see.
The report does not identify the specific code path or the component responsible for the stacking and focus behaviour, so the precise implementation mistake is not stated. What the report does make clear is the combination that defeats the user's expectation: a privileged always-on-top surface (the PiP window) is allowed to cover a security-relevant modal dialog, and the dialog's focus handling does not prevent it from being driven while hidden.
Impact
Under the stated precondition, an attacker can cause a malicious file to be saved at an arbitrary file path chosen through the hidden dialog. The report describes this as tricking the user into saving a malicious file at any path. The severity assigned is medium.
The limits are explicit in the report: the technique works only when the user has enabled Ask where to save each file before downloading in Downloads. Without that setting, the Save As dialog does not appear and the described interaction does not take place. The report does not describe any further escalation beyond writing the file to a chosen path.
Fix
It only documents the behaviour and the conditions under which it occurs.
Variants to test
These follow from the mechanism described in the report and are worth trying on other browsers and platforms:
- Other always-on-top surfaces. Test whether a PiP window, or any comparable floating surface, can be made to cover a security dialog. A positive result is a dialog that is invisible to the user but still receives keyboard focus.
- Other modal dialogs. Try the same stacking trick against dialogs other than Save As, such as permission prompts or file pickers. A positive result is a prompt whose answer can be supplied by keystrokes while it is obscured.
- Different download settings. Check whether the chain depends strictly on the Ask where to save each file before downloading option, or whether other download configurations also produce a focusable hidden dialog. A positive result is the same hidden-dialog behaviour with a different setting.
- Platform differences. Repeat the reproduction on operating systems other than the one in the report to see whether the stacking and focus behaviour is consistent. A positive result is the same obscured, focused dialog on another platform.
Hunting notes
This class of bug tends to hide where privileged UI surfaces meet security-relevant dialogs: always-on-top windows, fullscreen transitions, popups and any element the browser deliberately keeps above page content. During recon, the signal is a feature that changes window stacking or focus, combined with a dialog that the user is expected to read before acting. The report's own precondition, a non-default download setting, is a reminder to check behaviour under settings users can enable.
The report's steps show the dialog obscured by the PiP window, still receiving focus, with keystrokes resulting in a file being written. Stating the precondition plainly, and showing that the file write actually happens, is what makes the result concrete enough to act on.
What happened, in plain words
Chrome has a feature called Picture-in-Picture, usually shortened to PiP. When you watch a video on a website, PiP lets that video pop out into a small window that floats on top of everything else, so you can keep watching while you browse other pages or use other programs. Because that little window is designed to stay above other content, the browser treats it as special: it is allowed to sit on top of things that ordinary web pages cannot cover.
This report is about a flaw in how Chrome handles that floating window. When you download a file and you have told Chrome to ask you where to save each file, Chrome normally shows a Save As dialog, a small window where you pick the folder and the file name. The report says the Save As dialog can steal focus behind the PiP window. The dialog is still there and still accepts your keyboard input, but you cannot see it, because the PiP window is covering it completely.
Because the hidden dialog still receives focus, keystrokes reach it without the user seeing anything. The result is that a file can be saved to a location the attacker chooses, and the user is tricked into doing it. The catch is that this only works if the user has turned on the setting that makes Chrome ask where to save each file before downloading.
The issue is tracked as CVE-2025-8577. A CVE is a public catalogue number given to a known security flaw so people can refer to it unambiguously. It was rated medium severity, a bounty of 1000.00 USD was paid, and it was disclosed on 2025-08-05. The reporter credit given in the report is Puf.
The pieces involved
Before walking through the steps, here are the concepts you need.
- Picture-in-Picture (PiP): a browser feature that lifts a video out of its page into a small floating window that stays on top of other windows. Think of a sticky note you can move around your desk that always stays visible above your papers.
- API: short for Application Programming Interface. It is the set of rules a program offers so that other programs, or web pages, can ask it to do things. A useful comparison is a restaurant menu: you do not go into the kitchen, you order from the menu and the kitchen handles it. The Picture-in-Picture API is the menu a web page uses to ask the browser to show a floating video.
- Save As dialog: the small window Chrome shows when it needs you to choose where a file should be saved and what it should be called. A dialog is a window that asks you something and waits for an answer.
- Focus: in a computer interface, focus means which window or field is currently receiving your typing. When a window has focus, the keys you press go to it. Only one thing has focus at a time.
- Modal dialog: a dialog that blocks the rest of the program until you answer it. It is meant to be impossible to ignore, because the program is waiting on your decision.
- Arbitrary file path: any location on the disk, chosen freely, rather than a fixed or expected one. If an attacker can pick an arbitrary path, they can decide exactly where the file lands.
- Inappropriate implementation: the weakness category given to this bug. It means the feature was built in a way that does not behave as it should, rather than, say, a memory corruption bug. The code does something the designers did not intend.
- Chrome VRP: the Chrome Vulnerability Reward Program, Google's scheme that pays researchers for reporting security bugs in Chrome.
- Beta channel: a version of Chrome released for testing before it reaches everyone. Bugs found there may also affect the stable version.
- Regression: a bug that used to work correctly and then broke. The report marks this as N/A, meaning it is not recorded as a regression.
Setting up
The behaviour depends on one setting in Chrome. The report states the precondition as:
Enable Ask where to save each file before downloading in Downloads
That line is the name of an option in Chrome's Downloads settings. When it is switched on, Chrome does not quietly drop every download into your default downloads folder. Instead, for each download it opens the Save As dialog and waits for you to choose a location. That is exactly the moment this bug abuses: without a Save As dialog appearing, there is nothing to hide.
The test environment recorded in the report is:
| Item | Value |
|---|---|
| Chrome | 132.0.6834.46 (Official Build) beta (64-bit) (cohort: Beta) |
| Revision | [redacted]-refs/branch-heads/6834@{#1946} |
| OS | Windows 10 Version 22H2 (Build 19045.5131) |
| Channel | Beta |
| Regression | N/A |
The Chrome row is the exact version string, which identifies the build the researcher tested. The Revision row is an internal identifier for the exact source code that build was made from, useful to developers who need to find the same code. The OS row is the operating system and its build number. The Channel row repeats that this was the Beta channel. Regression is marked N/A.
Beyond a local file named poc.html, the report does not describe any accounts, roles or extra tools. A proof of concept, or PoC, is a small demonstration that shows a bug is real without doing any real harm.
Finding it
The researcher noticed that the Save As file dialog can take focus while sitting behind the Picture-in-Picture window. In plain terms: the dialog is opened and it grabs the keyboard, but it is drawn underneath the floating PiP window, so it is completely hidden from view. Because it still accepts input, a page can push the user's keystrokes into it while the user has no idea it is there.
The report states the consequence directly: it is possible to save a malicious file at an arbitrary file path, but only if the user has enabled Ask where to save each file before downloading in Downloads.
Reproducing it
The reproduction is short and happens entirely on the local machine. The steps below follow the report exactly.
Step 1: Open the proof of concept
Open the poc.html file in the browser. This loads the demonstration page. The report does not include the contents of poc.html, so the page's markup and script are not shown here.
Step 2: Click the button
Click the button on the page. Click the button on the page.
Step 3: Start the file write
Click on the Start file writing button. Click on the Start file writing button. That dialog is the target of the trick.
Step 4: Send the keystrokes
Press the keys ctrl + v and then the Enter key. A file will be written.
Here is what each part does. Ctrl + V is the standard keyboard shortcut for paste: it takes whatever is currently on the clipboard and inserts it into whatever has focus. The report lists the keystrokes without explaining what the paste inserts. Enter then confirms the dialog, accepting that path. Because the dialog is hidden behind the PiP window, the user sees none of this happen.
Why it works
The report describes the defect as an inappropriate implementation: the Save As file dialog can take focus while sitting behind the Picture-in-Picture window. The dialog is obscured but still receives focus, so keyboard input meant for the user, or simply typed by the user, is delivered to a control the user cannot see.
The report does not identify the specific code path or the component responsible for the stacking and focus behaviour, so the precise implementation mistake is not stated. What the report does make clear is the combination that defeats the user's expectation: a privileged always-on-top surface, the PiP window, is allowed to cover a security-relevant modal dialog, and the dialog's focus handling does not stop it from being driven while hidden.
A helpful comparison is a form you are asked to sign that someone has slid under a stack of papers. Your pen still reaches it, and your signature still counts, but you cannot see what you are signing.
Impact
Under the stated precondition, an attacker can cause a malicious file to be saved at an arbitrary file path chosen through the hidden dialog. The report describes this as tricking the user into saving a malicious file at any path. The severity assigned is medium.
The limits are explicit in the report: the technique works only when the user has enabled Ask where to save each file before downloading in Downloads. Without that setting, the Save As dialog does not appear and the described interaction does not take place. The report does not describe any further escalation beyond writing the file to a chosen path.
Fix
It only documents the behaviour and the conditions under which it occurs.
Variants to test
These follow from the mechanism described in the report and are worth trying on other browsers and platforms:
- Other always-on-top surfaces. Test whether a PiP window, or any comparable floating surface, can be made to cover a security dialog. A positive result is a dialog that is invisible to the user but still receives keyboard focus.
- Other modal dialogs. Try the same stacking trick against dialogs other than Save As, such as permission prompts or file pickers. A positive result is a prompt whose answer can be supplied by keystrokes while it is obscured.
- Different download settings. Check whether the chain depends strictly on the Ask where to save each file before downloading option, or whether other download configurations also produce a focusable hidden dialog. A positive result is the same hidden-dialog behaviour with a different setting.
- Platform differences. Repeat the reproduction on operating systems other than the one in the report to see whether the stacking and focus behaviour is consistent. A positive result is the same obscured, focused dialog on another platform.
Hunting notes
This class of bug tends to hide where privileged UI surfaces meet security-relevant dialogs: always-on-top windows, fullscreen transitions, popups and any element the browser deliberately keeps above page content. UI here means user interface, the parts of the screen you see and interact with. During recon, meaning the early exploration phase where you look for promising areas, the signal is a feature that changes window stacking or focus, combined with a dialog that the user is expected to read before acting. The report's own precondition, a non-default download setting, is a reminder to check behaviour under settings users can enable.
The report's steps show the dialog obscured by the PiP window, still receiving focus, with keystrokes resulting in a file being written. Stating the precondition plainly, and showing that the file write actually happens, is what makes the result concrete enough to act on.
Glossary
- API: the set of rules a program offers so other programs or web pages can ask it to do things; like ordering from a menu rather than entering the kitchen.
- Arbitrary file path: any location on disk, chosen freely by whoever controls the save, rather than a fixed or expected one.
- Beta channel: a version of Chrome released for testing before it reaches all users.
- Bounty: a payment made by a company to a researcher who reports a valid security bug.
- Chrome VRP: the Chrome Vulnerability Reward Program, Google's scheme for paying researchers for Chrome security bugs.
- CVE: a public catalogue number assigned to a known security flaw so it can be referred to unambiguously.
- Dialog: a small window that asks the user something and waits for an answer.
- Focus: the state of being the window or field that currently receives keyboard input; only one thing has focus at a time.
- Inappropriate implementation: a weakness category meaning the feature was built in a way that does not behave as intended, rather than a memory corruption or similar bug.
- Modal dialog: a dialog that blocks the rest of the program until the user answers it.
- Picture-in-Picture (PiP): a browser feature that lifts a video into a small floating window that stays on top of other windows.
- PoC (proof of concept): a small demonstration that shows a bug is real without causing real harm.
- Precondition: a condition that must already be true for a bug to work, here a specific Chrome setting.
- Regression: a bug in something that previously worked correctly and then broke.
- Revision: an internal identifier for the exact source code a build was made from.
- Save As dialog: the window Chrome shows when it needs the user to choose where a file is saved and what it is called.
- Severity: a rating of how serious a security issue is, here medium.
- UI (user interface): the parts of a program the user sees and interacts with.
- Weakness: the general category of a security flaw, such as inappropriate implementation.