Race in Storage (CVE-2025-12434)
A race condition in the File System Access API allows a file picker dialog to remain open over a cross-origin page, potentially confusing the user into selecting a file that is then exposed to the attacker's page. An attacker could trick a user into leaking sensitive file information.
- Fix shipped in 18 months
Steps to reproduce the problem
showOpenFilePicker dialog can be shown over a cross-origin page which might confuse a user into leaking sensitive information to an attacker
Problem Description
Load below html Click Select a file Check in console u can see file name there Attaching video proof
<html> <body onclick="f()">click me</body> <p></p> <script> function f() { const filePromise = window.showOpenFilePicker(); setTimeout(async () => { window.open("https://google.com") const handle = (await filePromise)[0]; console.log(`File: ${handle.name}`); // ... }, 0); }
</script>
Similar issue https://issues.chromium.org/40057597
Summary
Cross origin dialog spoof
Additional Data
Category: Security
Chrome Channel: Not sure
Regression: N/A
Context
Google Chrome's File System Access API exposes window.showOpenFilePicker(), which opens a native file picker dialog and resolves to an array of file handles. Each handle carries metadata such as name, so page script can read the chosen file's name. The dialog is a browser-owned surface: it is drawn by the browser, not by the page, and users are trained to trust it as belonging to whatever site they are looking at.
This report describes a race condition in how that dialog is presented relative to navigation. A page can open the picker and, in the same task, navigate the tab to a cross-origin site, so the picker dialog ends up displayed over a page from a different origin. The user sees a trusted browser dialog on top of, for example, google.com, selects a file, and the original page still receives the handle and logs the file name. The report summarises the issue as "Cross origin dialog spoof" and classifies it under Storage with the weakness Race. It was handled through the Chrome VRP, rated medium severity, with a bounty of 3000.00 USD, and disclosed on 2025-10-28.
Setup
The report lists no accounts, roles, tools or version numbers. The only stated preconditions are a Chrome build that supports showOpenFilePicker() and a page the attacker controls. The Chrome channel is recorded as "Not sure" and regression as "N/A".
Finding it
The report states that the picker dialog can be shown over a cross-origin page, which "might confuse a user into leaking sensitive information to an attacker". The concern is not that the file is read without consent, but that the consent is obtained under a misleading visual context: the dialog appears to belong to the site now in the tab, while the handle is delivered to the attacker's page. The report points to a similar earlier issue at https://issues.chromium.org/40057597.
Exploitation
Step 1: Serve the page
The attacker hosts the following HTML. The whole body is clickable and calls f().
<html>
<body onclick="f()">click me</body>
<p></p>
<script>
function f() {
const filePromise = window.showOpenFilePicker();
setTimeout(async () => {
window.open("https://google.com")
const handle = (await filePromise)[0];
console.log(`File: ${handle.name}`);
// ...
}, 0);
}
</script>
</html>
f() calls window.showOpenFilePicker() and stores the pending promise in filePromise. It then schedules a zero-delay setTimeout. Inside the timer callback it calls window.open("https://google.com") and awaits the picker promise, taking the first handle and logging handle.name.
Step 2: Click and select a file
The user clicks the page, which triggers f() and opens the picker. The timer fires immediately afterwards, so the tab navigates to https://google.com while the picker is still open. The dialog is then shown over the cross-origin page.
Step 3: Observe the result
The user selects a file. The awaited promise resolves in the original page's context, and the console shows the file name. The report states this as "Check in console u can see file name there" and notes that a video proof was attached; no video is available here.
The picker is requested from the attacker's page, and the visible page at the moment of selection is google.com.
Root cause
The report does not describe the implementation. What it shows is a race between the picker's presentation and a navigation initiated in the same task: the dialog is not tied to the origin that is visible when the user makes the selection. The report does not say which defence, if any, was expected to prevent this.
Impact
An attacker can obtain a file handle, and therefore the file's name, from a user who believes they are interacting with a different, trusted site. The report hedges the outcome: the dialog "might confuse a user into leaking sensitive information to an attacker". Exploitation requires user interaction (a click, then a file selection) and a Chrome build with the File System Access API.
Fix
A fix would need to ensure the picker cannot remain active across a cross-origin navigation of the top-level document, for example by cancelling the pending request when the document navigates, or by refusing to resolve it to an origin that is no longer displayed.
Variants to test
- Other picker entry points: try the same click-then-navigate pattern with any API that opens a browser-owned chooser and returns data to the page. A positive result is a chooser shown over a different origin whose result still reaches the original page.
- Different navigation primitives: replace
window.openwithlocation.hrefor a form submission to a cross-origin URL. A positive result is the same cross-origin dialog with the result still delivered. - Timing variations: vary the delay and the order of the navigation and the await. A positive result is any ordering where the dialog is visible over the other origin at selection time.
- Same-origin versus cross-origin targets: check whether the effect depends on the destination being a different origin. A positive result confined to cross-origin destinations is the strongest signal of a spoofing issue.
Hunting notes
This kind of bug hides where browser UI and page-controlled navigation share a task: permission prompts, file pickers, share sheets and similar native surfaces. During recon, look for APIs that return privileged objects asynchronously and whose prompts are not modal to the tab. The report includes a minimal page, a click-to-select sequence and console output showing the file name. The report itself contains no further guidance on where to look.
References
- Similar issue:
https://issues.chromium.org/40057597
What happened, in plain words
Chrome has a feature that lets a website ask you to pick a file from your computer. When you pick one, the website gets a handle to that file, which carries its name. Chrome shows the file picker as a window that belongs to the browser itself, not to the website, and people have learned to trust it.
The bug in this report is about when that picker is shown. A malicious page can open the picker and, at almost the same moment, send the tab to a different website, for example google.com. The picker stays open and now appears on top of google.com. You see a trusted browser dialog over a site you recognise, you choose a file, and the attacker's page receives the handle and logs the file name. The report calls this "Cross origin dialog spoof".
It was handled through the Chrome VRP (Chrome's bug bounty programme), rated medium severity, with a bounty of 3000.00 USD, and disclosed on 2025-10-28.
Background you need first
A few ideas come up again and again below, so here they are from zero.
- A browser tab and its origin. An origin is the combination of protocol, host and port, for example
https://google.com. Two pages with different origins are not allowed to read each other's data. This is one of the main safety walls of the web. - An API. An API is a set of functions a program offers to other programs.
window.showOpenFilePicker()is an API that Chrome offers to web pages: the page calls it, and the browser does something on the page's behalf. - A promise. When a page asks the browser for something that takes time (like waiting for you to choose a file), the browser does not stop everything. It hands back a promise, an object that says "the answer will arrive later". The page can wait for it with
await. - A file handle. The result of the picker is a handle: an object that represents the chosen file. It carries metadata such as
name, and with it the page can also read the file's contents. - A race condition. A race is a bug where the result depends on which of two things happens first. Think of two people reaching for the same door at the same time: whether one gets through before the other closes it decides the outcome. Here the two things are "the picker is shown" and "the tab navigates away".
- Spoofing. Spoofing means making something look like something it is not. A dialog spoof is a browser window that looks like it belongs to the site you are looking at, when in fact it belongs to another site.
Context
Google Chrome's File System Access API exposes window.showOpenFilePicker(). It opens a native file picker dialog and resolves to an array of file handles. Each handle carries metadata such as name, so page script can read the chosen file's name, and with the handle, its contents. The dialog is a browser-owned surface: it is drawn by the browser, not by the page, and users are trained to trust it as belonging to whatever site they are looking at.
This report describes a race condition in how that dialog is presented relative to navigation. A page can open the picker and, in the same task, navigate the tab to a cross-origin site, so the picker dialog ends up displayed over a page from a different origin. The user sees a trusted browser dialog on top of, for example, google.com, selects a file, and the original page still receives the handle and logs the file name. The report summarises the issue as "Cross origin dialog spoof" and classifies it under Storage with the weakness Race.
Setup
The report lists no accounts, roles, tools or version numbers. The only stated preconditions are a Chrome build that supports showOpenFilePicker() and a page the attacker controls. The Chrome channel is recorded as "Not sure" and regression as "N/A".
In other words: you need a Chrome new enough to have the file picker feature, and you need to be able to get the victim to open a page you wrote. Nothing else.
Finding it
The report states that the picker dialog can be shown over a cross-origin page, which "might confuse a user into leaking sensitive information to an attacker". The concern is not that the file is read without consent, but that the consent is obtained under a misleading visual context: the dialog appears to belong to the site now in the tab, while the handle is delivered to the attacker's page. The report points to a similar earlier issue at https://issues.chromium.org/40057597.
Put simply: the user does say yes, but they say yes to the wrong site. The browser's own trusted window is used as a disguise.
Exploitation
Step 1: Serve the page
The attacker hosts the following HTML. The whole body is clickable and calls f().
<html>
<body onclick="f()">click me</body>
<p></p>
<script>
function f() {
const filePromise = window.showOpenFilePicker();
setTimeout(async () => {
window.open("https://google.com")
const handle = (await filePromise)[0];
console.log(`File: ${handle.name}`);
// ...
}, 0);
}
</script>
</html>
Line by line:
<html>,<body onclick="f()">click me</body>: the page shows the words "click me", and clicking anywhere on the body runs the functionf(). The click runs the functionf().<p></p>: an empty paragraph, just filler.<script>: the start of the page's JavaScript, the code the browser runs.function f() {: defines the function that the click triggers.const filePromise = window.showOpenFilePicker();: asks the browser to open the file picker and stores the pending promise infilePromise. The picker opens now; the answer will come later.setTimeout(async () => {: schedules a piece of code to run after a delay. The delay is given at the end of the block, and it is0, meaning "as soon as possible, after the current work finishes".window.open("https://google.com"): opens google.com. Because the timer fires right after the click handler, this navigation starts while the picker is still open.const handle = (await filePromise)[0];: waits for the user to choose a file, then takes the first element of the returned array, which is the file handle.console.log(File: ${handle.name});: prints the chosen file's name into the browser console, the developer message area.// ...: a comment, a placeholder suggesting the attacker could go on to read the file's contents.}, 0);: closes the timer callback and sets the zero delay.}: closesf().</script>,</html>: close the script and the page.
Step 2: Click and select a file
The user clicks the page, which triggers f() and opens the picker. The timer fires immediately afterwards, so the tab navigates to https://google.com while the picker is still open. The dialog is then shown over the cross-origin page.
Why this order matters: the picker must be requested from the attacker's page, because that is the origin that will receive the handle. The navigation must happen after the request but before the user finishes choosing. The zero-delay timer is the tool that produces exactly that order without blocking the picker from opening.
Step 3: Observe the result
The user selects a file. The awaited promise resolves in the original page's context, and the console shows the file name. The report states this as "Check in console u can see file name there" and notes that a video proof was attached; no video is available here.
The picker is requested from the attacker's page, and the visible page at the moment of selection is google.com.
Root cause
The report does not describe the implementation. What it shows is a race between the picker's presentation and a navigation initiated in the same task: the dialog is not tied to the origin that is visible when the user makes the selection. The report does not say which defence, if any, was expected to prevent this.
In everyday terms: the browser keeps the request alive across the move to another site, and never checks that the site on screen is still the site that asked.
Impact
An attacker can obtain a file handle, and therefore the file's name, from a user who believes they are interacting with a different, trusted site. The report hedges the outcome: the dialog "might confuse a user into leaking sensitive information to an attacker". Exploitation requires user interaction (a click, then a file selection) and a Chrome build with the File System Access API.
Fix
A fix would need to ensure the picker cannot remain active across a cross-origin navigation of the top-level document, for example by cancelling the pending request when the document navigates, or by refusing to resolve it to an origin that is no longer displayed.
Variants to test
If you want to look for related bugs, these are some directions to try. Each one keeps the same idea: a browser-owned chooser shown over one site while its result goes to another.
- Other picker entry points: try the same click-then-navigate pattern with any API that opens a browser-owned chooser and returns data to the page. A positive result is a chooser shown over a different origin whose result still reaches the original page.
- Different navigation primitives: replace
window.openwithlocation.hrefor a form submission to a cross-origin URL. A positive result is the same cross-origin dialog with the result still delivered. - Timing variations: vary the delay and the order of the navigation and the await. A positive result is any ordering where the dialog is visible over the other origin at selection time.
- Same-origin versus cross-origin targets: check whether the effect depends on the destination being a different origin. A positive result confined to cross-origin destinations is the strongest signal of a spoofing issue.
Hunting notes
This kind of bug hides where browser UI and page-controlled navigation share a task: permission prompts, file pickers, share sheets and similar native surfaces. During recon, look for APIs that return privileged objects asynchronously and whose prompts are not modal to the tab. The report includes a minimal page, a click-to-select sequence and console output showing the file name. The report itself contains no further guidance on where to look.
References
- Similar issue:
https://issues.chromium.org/40057597
Glossary
- API: a set of functions one program offers to another; here, the functions Chrome offers to web pages.
- Await: a JavaScript keyword that pauses a function until a promise produces its result.
- Bounty: money paid by a vendor for a valid security report.
- Chrome VRP: Chrome's Vulnerability Reward Program, the scheme that receives and pays for Chrome security bugs.
- Console: the message area in a browser's developer tools where pages can print text.
- Cross-origin: belonging to a different origin (protocol, host and port) than the page in question.
- CVE: a public identifier given to a known security vulnerability.
- Dialog: a window shown by the browser or the system to ask the user something.
- File handle: an object representing a chosen file, carrying its name and allowing its contents to be read.
- File System Access API: the Chrome feature that lets pages ask the user to pick files and then work with them.
- HTML: the language that describes the structure of a web page.
- JavaScript: the programming language that runs inside web pages.
- Origin: the combination of protocol, host and port that identifies a site for security purposes.
- Promise: an object representing a result that will arrive later.
- Race condition: a bug whose outcome depends on which of two actions happens first.
- Recon: the exploratory phase of security testing, looking for interesting features and behaviours.
- Regression: a bug that reappears after having been fixed, or a check for that.
- Severity: a rating of how serious a vulnerability is.
- Spoofing: making something appear to be something it is not, such as a dialog that looks like it belongs to another site.
- Storage: the category the report was filed under, relating to how the browser stores and hands out data such as files.
- Task: a unit of work the browser runs to completion before moving on to the next.
setTimeout: a JavaScript function that runs code after a given delay.window.open: a JavaScript function that opens a URL, often in a new tab or window.window.showOpenFilePicker(): the function that opens Chrome's native file picker and returns a promise for the chosen file handles.