Missing authorization in FileSystem (CVE-2026-87493)
The File System Access API's read-permission revocation on file removal can be bypassed because the move operation only checks write permission. A site can move an externally recreated file into a directory it controls and then read it via a new handle that inherits the directory's read access.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: The File System Access API can potentially bypass the read permission revocation intended by kFileSystemAccessRevokeReadOnRemove. When a site deletes a file, its read grant is revoked, but its write grant is retained. The site can then move an externally recreated version of that file into a directory it controls, acquiring a new handle that inherits the directory's read access and exposing the file's contents.
Affected files:
content/browser/file_system_access/file_system_access_file_handle_impl.cccontent/browser/file_system_access/file_system_access_handle_base.cccontent/browser/file_system_access/file_system_access_directory_handle_impl.cc
Estimated timestamp from git blame: Unknown (Google3 checkout)
Summary
A potential security bypass exists in the File System Access API's kFileSystemAccessRevokeReadOnRemove mechanism. This feature is designed to downgrade read access to a file handle when the file is removed. However, because the move() operation on a file handle only checks for write permissions, an attacker can relocate a file with revoked read access into a directory for which they have full read/write access. By then retrieving a new handle to the moved file from the destination directory, the site gains read access via directory-based permission inheritance, bypassing the original revocation.
Technical Details
When a file is removed via FileSystemHandle.remove(), the FileSystemAccessHandleBase::DidRemove callback triggers NotifyEntryRemoved if the kFileSystemAccessRevokeReadOnRemove feature is active. ChromeFileSystemAccessPermissionContext::NotifyEntryRemoved specifically downgrades the active and persistent read grants for that path. Crucially, the site's write grant for the file handle is left completely intact.
If the file is subsequently recreated at the same path by an external application, the site can call fileHandle.move(dirHandle, 'new_name') on its existing handle. The implementation in content/browser/file_system_access/file_system_access_file_handle_impl.cc uses GetEffectiveWritePermissionMode() for the Move operation. Since the kFileSystemAccessWriteMode feature is stable, this evaluates to kWrite.
Therefore, RunWithPermission only verifies that the site has kWrite access to the source file, which it still does because only the read grant was revoked. The system does not verify if the site possesses kRead access to the source file. The file is successfully moved to the destination directory.
When the site calls getFileHandle() on the destination directory, the new file handle is created in FileSystemAccessDirectoryHandleImpl::DidGetFile using the directory's handle_state(). Since handle_state() contains the directory's granted permissions, the new handle to the moved file perfectly inherits the directory's read access. This allows the site to read the sensitive data in the recreated file, circumventing the intended read revocation.
Potential Steps to Reproduce
Note: These steps are based on static analysis and have not been executed via a working exploit.
- Use a browser with the
FileSystemAccessRevokeReadOnRemoveandFileSystemAccessWriteModefeatures enabled (default in stable). - A site prompts the user to grant read/write access to a directory via
showDirectoryPicker(). - The site prompts the user to grant read/write access to a specific file via
showSaveFilePicker(). - The site calls
fileHandle.remove(). The backend revokes the read permission for this handle but leaves the write permission intact. - An external process (or user action outside the browser) recreates the file at the original path, containing sensitive data.
- The site calls
fileHandle.move(dirHandle, 'leaked.txt'). The operation succeeds because write access to the source is still held. - The site calls
const newHandle = await dirHandle.getFileHandle('leaked.txt'). - The site calls
await (await newHandle.getFile()).text(), gaining unauthorized access to the sensitive data.
Suggested Fix
When performing a Move operation across different directories (where the parent directory is not the same as the destination directory, or when moving from an explicit file grant to a directory grant), the system should verify that the site possesses both kRead and kWrite permissions for the source file, rather than just kWrite. Alternatively, if kFileSystemAccessRevokeReadOnRemove is intended to revoke all access to a deleted file, it should be updated to revoke both read and write grants.
Evaluated with Chrome root at commit: 65b3256311f3ab6fb9870eaa522de7e6dd2663bb
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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
The move operation checks only write permission on the source file, not read permission, so a handle whose read grant was revoked can still be moved into a directory whose permissions then grant read access.
Impact
A site could read the contents of a file whose read permission was supposed to have been revoked, but only if an external process recreates the file at the same path and the site already holds write access to it.
What the attacker needed
User grants directory read/write access; user grants file read/write access; external process recreates the file
The fix
The move operation should require both read and write permission on the source file, or the revocation should remove both read and write grants.
How it was found
- A site obtains read/write access to a directory via the directory picker.
- The site obtains read/write access to a specific file via the save file picker.
- The site removes the file, which revokes read permission but keeps write permission.
- An external process recreates the file at the same path with sensitive data.
- The site moves the file into the directory it controls.
- The site gets a new handle to the moved file and reads its contents.
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.
When a website is given access to a file, the browser can later take away the permission to read it. This report shows that the website can still move that file into a folder it fully controls, and then read it through the folder's permissions. The browser should have checked that the website still had permission to read the file before allowing the move.
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.