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

Inappropriate implementation in FileSystem (CVE-2026-17693)

A suspected logic flaw in Chromium's File System Access permission model lets a site keep write access to a file after removing it, then use a writable stream with existing data kept to copy a recreated file's contents into a swap file. Closing the writer restores read permission, so the site could then read content it was not meant to see.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 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: A potential logical vulnerability exists in Chromium's File System Access permission model where an origin can bypass the read-revocation on file removal mitigation. By invoking createWritable({keepExistingData: true}) on a removed file handle, a website can exploit its unrevoked write permission to copy a newly recreated file's content into a swap file. Upon closing the writer, the website's read permission is automatically restored, allowing it to silently access the unauthorized contents.

Affected files:

  • content/browser/file_system_access/file_system_access_file_handle_impl.cc
  • chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
  • content/browser/file_system_access/file_system_access_file_writer_impl.cc
  • content/browser/file_system_access/file_system_access_handle_base.cc

Estimated timestamp from git blame: 2025-09-01

Summary

A potential logical vulnerability in Chromium's File System Access (FSA) API permission model could allow an origin to bypass the kFileSystemAccessRevokeReadOnRemove security mitigation. By using createWritable({keepExistingData: true}), a webpage could potentially leverage its unrevoked write permission to copy a newly recreated file's contents into a swap file without having active read permission. Upon closing the writable stream, the origin's read permission for the file is automatically restored, allowing it to silently read the unauthorized content.

Root Cause Analysis

When a file is deleted via handle.remove(), the kFileSystemAccessRevokeReadOnRemove mitigation downgrades/revokes the origin's active read permission and adds the path to the origin's downgraded_read_paths set within ChromeFileSystemAccessPermissionContext::NotifyEntryRemoved(). Crucially, the origin's write permission remains active and GRANTED.

With the kFileSystemAccessWriteMode feature enabled, calling createWritable() on the file handle checks only the active write permission. If the file is subsequently recreated on disk by another process or application, the webpage can invoke createWritable({keepExistingData: true}).

The browser process proceeds to copy the recreated file's contents into a swap file inside FileSystemAccessFileHandleImpl::CreateSwapFileFromCopy() via FileSystemOperationRunner::Copy(). Because this file replication is treated as a lower-level browser/storage operation, the origin's actual read permission status is not verified during the copy.

When the writer is closed, FileSystemAccessFileWriterImpl::DidReplaceSwapFile() replaces the target file with the swap file's contents and triggers MaybeNotifyEntryModified(). This calls ChromeFileSystemAccessPermissionContext::NotifyEntryModified(), which erases the path from downgraded_read_paths and restores the origin's read grant status back to GRANTED.

Potential Step-by-Step Sequence

(Please note that these are suggested/potential steps as we currently do not have a working proof of concept environment to run the code.)

  1. The webpage obtains a file handle with read and write permissions (e.g., via showOpenFilePicker).

  2. The webpage removes the file: await handle.remove();. This revokes/downgrades its active read permission while preserving its active write permission.

  3. The webpage starts an asynchronous polling loop that periodically attempts to create a writer:

    JavaScript
    while (true) {
      try {
        const writer = await handle.createWritable({keepExistingData: true});
        await writer.close();
        break;
      } catch (e) {
        if (e.name === 'NotFoundError') {
          await new Promise(r => setTimeout(r, 1000));
        } else {
          throw e;
        }
      }
    }
    
  4. A victim or an external application recreates the file at that path with new, sensitive content.

  5. In the next iteration of the loop, createWritable({keepExistingData: true}) succeeds. The browser copies the new sensitive file's contents into the .crswap file.

  6. The webpage immediately closes the writer (await writer.close()). The browser replaces the target file and restores the read permission back to GRANTED via MaybeRestoreReadPermission().

  7. The webpage calls await (await handle.getFile()).text(); to silently read and exfiltrate the sensitive content.

Suggested Remediation

Before executing a file copy inside CreateSwapFileFromCopy() (or performing copy-on-write cloning in CreateClonedSwapFile()) when keep_existing_data is true, the browser should verify that the origin currently has active, non-downgraded read permission to the target file. If read permission is not granted, the operation should fail and reject the createWritable() call.

Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8


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.

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 copy performed when creating a writable stream with existing data kept does not check that the origin still has active read permission, only that write permission is granted.

Impact

A site could potentially read the contents of a file recreated at the same path after it removed the original, without holding read permission at the time; the report notes no working proof of concept was built.

What the attacker needed

User grants file access via picker; file is recreated at the same path; write-mode feature enabled

The fix

The browser should check for active, non-downgraded read permission before copying existing data into a swap file, and reject the writable request if it is missing.

How it was found

  1. The page gets a file handle with read and write permission, for example through the file picker.
  2. The page removes the file, which revokes read permission but keeps write permission.
  3. The page repeatedly tries to open a writable stream that keeps existing data, retrying while the file is missing.
  4. Another process or the victim recreates the file at the same path with new content.
  5. The next attempt succeeds and the browser copies the new content into a swap file; closing the writer restores read permission.
  6. The page reads the file contents through the handle.

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 take that access away again, for example after the file is deleted. This report suggests that a site could keep a leftover ability to write to the file and use it to quietly copy a new version of the file that someone else later puts back. The author says they had no working test, so this is a theory rather than a demonstrated attack.

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.