Skip to content
Access control Advisory Advanced CVE-2026-87611

Missing authorization in FileSystem (CVE-2026-87611)

Several Mojo methods in the File System Access API resolve transfer tokens without checking that the token belongs to the caller's origin. A compromised renderer could redeem another origin's token to perform cross-origin file operations such as moving a file into a victim's directory.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 6 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: Several Mojo methods in the File System Access API fail to verify that a provided transfer token belongs to the caller's origin. A compromised renderer can intercept a token sent via postMessage from another origin and redeem it via methods like Move, Resolve, or Observe. This potentially allows unauthorized cross-origin file operations, such as writing to a victim's directory.

Affected files:

  • content/browser/file_system_access/file_system_access_directory_handle_impl.cc
  • content/browser/file_system_access/file_system_access_file_handle_impl.cc
  • content/browser/file_system_access/file_system_access_handle_base.cc
  • content/browser/file_system_access/file_system_access_observer_host.cc

Estimated timestamp from git blame: 2025-08-25

Note: The following analysis and steps are suggested by an AI agent. A working proof-of-concept has not been executed, but the logical flow has been traced through the codebase.

Root Cause

In the File System Access API, when handles are passed via postMessage, they are serialized into a FileSystemAccessTransferToken. When these tokens are normally redeemed (e.g., via GetFileHandleFromToken), the browser enforces an origin check via IsValidTransferToken() to ensure the calling renderer's origin matches the origin embedded in the token.

However, several Mojo API endpoints take a PendingRemote<FileSystemAccessTransferToken> as an argument and resolve it using FileSystemAccessManagerImpl::ResolveTransferToken(). This method retrieves the token via its unguessable ID but fails to perform any origin validation. The resulting FileSystemAccessTransferTokenImpl is then directly acted upon.

The following methods are affected:

  1. FileSystemAccessHandleBase::DoMove: Passes the token to DidResolveTokenToMove. An attacker can use a victim's directory token as the destination, potentially moving their own files into the victim's directory, bypassing cross-origin write restrictions.
  2. FileSystemAccessDirectoryHandleImpl::Resolve: Passes the token to ResolveImpl. Can be used to disclose relative paths of a victim's files.
  3. FileSystemAccessObserverHost::Observe: Passes the token to DidResolveTransferTokenToObserve. Can be used to spy on file changes in a victim's handle.
  4. FileSystemAccessFileHandleImpl::IsSameEntry: Passes the token to IsSameEntryImpl. Can be used to verify if an attacker's file handle matches a victim's.

Potential Exploitation Steps (e.g., Cross-Origin Write via Move)

  1. Victim Grants Access: A victim origin (https://victim.com) requests and is granted access to a local directory (e.g., /home/user/VictimDir/) via showDirectoryPicker().
  2. Token Transfer: The victim web application inadvertently or intentionally shares this directory handle with an attacker origin (https://attacker.com) via window.postMessage(directoryHandle, '*').
  3. Token Interception: The attacker has compromised the renderer process for https://attacker.com. Instead of letting the browser reject standard deserialization, the attacker intercepts the raw Mojo PendingRemote<FileSystemAccessTransferToken> IPC message.
  4. Attacker Context: The compromised attacker renderer obtains a legitimate file handle for one of its own files (e.g., /home/user/AttackerDir/evil.txt).
  5. The Exploit Call: The attacker issues a raw Mojo call to their file handle's Move method, passing the victim's intercepted PendingRemote<FileSystemAccessTransferToken> as the destination directory, and "pwned.txt" as the new name.
  6. Browser Processing: In the browser process, FileSystemAccessHandleBase::DoMove calls manager()->ResolveTransferToken(). The token is successfully resolved without an origin check.
  7. Unauthorized Write: DidResolveTokenToMove checks the write permission of the resolved token. Because the GetStatus() check on the token's grant evaluates the original victim's granted permissions, it passes. The attacker's file is moved into the victim's directory, achieving an unauthorized cross-origin file write.

Suggested Fix

Update FileSystemAccessManagerImpl::ResolveTransferToken() (or its DoResolveTransferToken internal helper) to accept the calling binding_context.storage_key.origin() and enforce IsValidTransferToken() before returning the resolved token. Alternatively, enforce the IsValidTransferToken() origin check individually in all vulnerable callbacks (DidResolveTokenToMove, ResolveImpl, DidResolveTransferTokenToObserve, IsSameEntryImpl).

Evaluated with Chrome root at commit: bb48272cafb7e24c93f55ef40da398cd206ee651


Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. Please feel free to reach out to me if you have concerns or feedback.

The original report as published on the Chromium issue tracker. 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 shared token resolution helper returns a token by its ID without verifying that the calling renderer's origin matches the origin stored in the token.

Impact

This could allow unauthorised cross-origin file operations, including writing into a victim's directory, though no working proof-of-concept was executed.

What the attacker needed

Victim grants directory access; victim page posts handle to attacker; attacker controls a renderer process

The fix

The token resolution helper should take the caller's origin and enforce the existing transfer-token origin check before returning the token, or each vulnerable callback should do so.

How it was found

  1. The victim origin is granted access to a local directory through the directory picker.
  2. The victim page shares the directory handle with the attacker origin via postMessage.
  3. The attacker's compromised renderer intercepts the raw transfer token message.
  4. The attacker obtains a file handle for one of its own files.
  5. The attacker calls Move on its own handle, passing the victim's token as the destination.
  6. The browser resolves the token without an origin check and moves the attacker's file into the victim's directory.

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 web page can ask the user for access to a folder, and the browser gives it a special ticket (a token) for that folder. The report says some internal browser calls accept such a ticket without checking who is handing it over, so a malicious page could use someone else's ticket to touch their files.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.