Inappropriate implementation in FileSystemAccess API (CVE-2025-5065)
The FileSystemAccess API allowed a file picker to be shown on a different origin while retaining the FileSystemHandle, and the open() function did not require its own user interaction. An attacker could use this to open a new window as a popunder and potentially access files chosen by the user.
- Fix shipped in 3.2 years
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
Steps to reproduce the problem: onmouseup = _ => { let fs = showOpenFilePicker(); open('https://www.google.com'); }
Click
What is the expected behavior? For open() to require its own user interaction. (it also allows for a window popunder) Stuff like window.close location.href should lose the FileSystemHandle anyway.
What went wrong? File picker shown on the wrong origin while keeping FileSystemHandle.
Did this work before? N/A
Chrome version: 99.0.4844.51 Channel: stable OS Version: 10.0
What the report shows
This is a Chrome VRP advisory for an inappropriate implementation in the FileSystemAccess API, tracked as CVE-2025-5065. The researcher is NDevTK, the severity is medium, and the bounty was 2,000 USD. The report was disclosed on 27 May 2025. The affected feature is the file picker exposed through showOpenFilePicker().
The researcher tested on Chrome 99.0.4844.51, stable channel, on Windows 10.0, with this user agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
The reproduction is a single mouseup handler. On the click, it opens a file picker and then calls open() to navigate a new window to Google:
onmouseup = _ => {
let fs = showOpenFilePicker();
open('https://www.google.com');
}
The step given is simply: click.
The expected behaviour, in the researcher's words, is that open() should require its own user interaction. The report also notes that the same pattern allows a window popunder. It adds that operations such as window.close and setting location.href should lose the FileSystemHandle anyway.
What went wrong: the file picker is shown on the wrong origin while the FileSystemHandle is kept. The report does not say whether the issue worked in earlier builds; the field for that is marked N/A. It gives no fix commit, no patch description and no further technical detail beyond the reproduction above.
Root cause
The report does not state a root cause; it only gives the reproduction and the observed behaviour. A single click both starts the file picker and authorises open(). The report states that the file picker is shown on the wrong origin while the FileSystemHandle is kept.
Impact
The report frames the impact as a file picker shown on the wrong origin while the FileSystemHandle is retained. The report describes a file picker shown on the wrong origin while the FileSystemHandle is kept. The report also notes the same gesture reuse permits a popunder. The report does not demonstrate reading file contents, so the impact is limited to what it describes: the picker on the wrong origin and the kept handle.
How this kind of bug works
Browsers gate sensitive actions behind transient user activation: a short-lived flag set by a real click, key press or tap. APIs such as opening a file picker, opening a popup, entering fullscreen or requesting certain permissions check that flag. The flag is meant to be consumed by the action that uses it, so one gesture authorises one privileged operation.
Bugs appear when the flag is checked but not cleared, when it is shared between an asynchronous API and a synchronous one, or when a navigation changes the origin of the document while a capability granted under the old origin remains valid. File system handles are capability objects: possession of the handle is the permission. If the handle outlives the origin that requested it, the security boundary between origins is weakened.
Defences are straightforward in principle: consume activation on first use, bind capabilities to the document and origin that created them, and revoke handles on navigation or when the document is replaced. The hard part is applying this consistently across every API that reads the activation state.
How to test for it
- Identify APIs that require user activation: file and directory pickers, popup creation, fullscreen, clipboard, permission prompts, payment requests.
- For each, build a page where a single click triggers two of them in sequence, mixing synchronous and asynchronous calls, and observe whether both succeed.
- Vary the order: start the picker and immediately navigate, open a popup and then call a picker, close the window mid-flow.
- Watch whether the privileged UI appears against the origin you expect, and whether any handle or capability remains usable after a navigation.
- Test with synthetic events as well as real clicks to see whether activation is being checked at all.
A positive result looks like two privileged actions from one gesture, or a capability that still works after the document has navigated to another origin. Common false positives are browser settings or extensions that relax activation rules, test builds with different flags, and cases where the second action was actually triggered by a separate event you did not notice. Confirm on a clean profile and a stable build before reporting.
How it is fixed
The report gives no fix commit or patch description. General defences for this class of bug include consuming activation on first use and binding handles to the originating document and origin. Popup creation should likewise require its own activation rather than reusing one already spent.
Hunting notes
This class tends to hide at the seams between APIs: pickers combined with navigation, popups combined with permission prompts, and anything asynchronous that reads activation after an await. Recon signals include features that grant long-lived capabilities (file handles, streams, device access) and any code path where a navigation can occur between the grant and the use. Keep the proof short and reproducible on a stable build.
What happened, in plain words
This is a security advisory from Google's Chrome Vulnerability Reward Program (VRP), the scheme that pays people who find and report bugs in the Chrome browser. The researcher is NDevTK, the severity is medium, and the bounty was 2,000 USD. It was disclosed on 27 May 2025 and is tracked as CVE-2025-5065, a unique identifier given to a publicly known security flaw. The affected feature is the file picker that websites can open through a browser function called showOpenFilePicker().
To understand the bug, you need two ideas. First, a website in a browser is tied to an origin: the combination of protocol, hostname and port, roughly "which site this is". Browsers keep sites apart so that one site cannot act as another. Second, browsers only allow certain sensitive actions, such as opening a file picker or a popup window, after a real user interaction (a click, tap or key press). This is called transient user activation: a short-lived permission slip that a genuine gesture hands to the page. The idea is that one gesture authorises one sensitive action.
The researcher tested on Chrome 99.0.4844.51, stable channel, on Windows 10.0, and recorded this user agent, the string a browser sends to identify itself:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
The reproduction is a single handler for the mouseup event, which fires when the mouse button is released. On that click it opens a file picker and then calls open() to load Google in a new window:
onmouseup = _ => {
let fs = showOpenFilePicker();
open('https://www.google.com');
}
Line by line:
onmouseup = _ => {attaches a function to the page that runs when the mouse button is released. The_is just a placeholder for the event object the browser passes in.let fs = showOpenFilePicker();asks the browser to show the file picker and stores the result, a FileSystemHandle, in the variablefs. A handle is a reference to a file or folder that the page can later use, and holding the handle is effectively the permission to use it.open('https://www.google.com');opens a new window pointing at Google.}closes the function.
The only step given is: click.
What the researcher expected, in their words, is that open() should require its own user interaction. In other words, one click should not authorise both the file picker and the popup. The report also notes that the same pattern allows a popunder, a window that opens behind the current one so the user may not notice it. It adds that operations such as window.close and setting location.href (which navigates the page to another address) should lose the FileSystemHandle anyway.
What went wrong, according to the report: the file picker is shown on the wrong origin while the FileSystemHandle is kept. The file picker is shown on the wrong origin while the FileSystemHandle is kept. The report does not say whether the issue worked in earlier builds; that field is marked N/A. It gives no fix commit, no patch description and no further technical detail beyond the reproduction above.
In general, how this kind of bug works
Browsers gate sensitive actions behind transient user activation: a short-lived flag set by a real click, key press or tap. APIs such as opening a file picker, opening a popup, entering fullscreen or requesting certain permissions check that flag. The flag is meant to be consumed by the action that uses it, so one gesture authorises one privileged operation. Think of it like a single-use ticket at a counter: you hand it over once, and it is gone.
Bugs appear when the flag is checked but not cleared, when it is shared between an asynchronous API (one that finishes later) and a synchronous one (one that finishes immediately), or when a navigation changes the origin of the document while a capability granted under the old origin remains valid. File system handles are capability objects: possession of the handle is the permission. If the handle outlives the origin that requested it, the security boundary between origins is weakened.
Defences are straightforward in principle: consume activation on first use, bind capabilities to the document and origin that created them, and revoke handles on navigation or when the document is replaced. The hard part is applying this consistently across every API that reads the activation state.
How to test for it
- Identify APIs that require user activation: file and directory pickers, popup creation, fullscreen, clipboard, permission prompts, payment requests.
- For each, build a page where a single click triggers two of them in sequence, mixing synchronous and asynchronous calls, and observe whether both succeed.
- Vary the order: start the picker and immediately navigate, open a popup and then call a picker, close the window mid-flow.
- Watch whether the privileged UI appears against the origin you expect, and whether any handle or capability remains usable after a navigation.
- Test with synthetic events as well as real clicks to see whether activation is being checked at all.
A positive result looks like two privileged actions from one gesture, or a capability that still works after the document has navigated to another origin. Common false positives are browser settings or extensions that relax activation rules, test builds with different flags, and cases where the second action was actually triggered by a separate event you did not notice. Confirm on a clean profile and a stable build before reporting.
How it is fixed
The report gives no fix commit or patch description. General defences for this class of bug include consuming activation on first use and binding handles to the originating document and origin. Popup creation should likewise require its own activation rather than reusing one already spent.
Hunting notes
This class tends to hide at the seams between APIs: pickers combined with navigation, popups combined with permission prompts, and anything asynchronous that reads activation after an await (a point where the code pauses and resumes later). Recon signals include features that grant long-lived capabilities (file handles, streams, device access) and any code path where a navigation can occur between the grant and the use. Keep the proof short and reproducible on a stable build.
Glossary
- Advisory: a public notice describing a security flaw, its impact and often its fix.
- Bounty: a payment made by a company to someone who reports a valid security bug.
- Capability object: an object whose mere possession grants permission to do something, such as a file handle.
- CVE: a unique public identifier assigned to a known security vulnerability.
- FileSystemHandle: a browser object that refers to a file or folder the user has chosen, and that the page can use later.
- Origin: the combination of protocol, hostname and port that identifies a site to the browser.
- Popunder: a window that opens behind the current window, often unnoticed by the user.
- Popup: a new browser window opened by a page, usually gated behind a user gesture.
- Stable channel: the normal, fully tested release of a browser that most users run.
- Transient user activation: a short-lived flag set by a real click, tap or key press that authorises one sensitive action.
- User agent: the string a browser sends to identify itself, including its version and platform.
- VRP (Vulnerability Reward Program): a company scheme that pays researchers for reporting security bugs.