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

Missing authorization in FileSystem (CVE-2026-84328)

A logic flaw in the File System Access API's handle deserialisation allows a compromised renderer to bypass origin checks and gain cross-origin read/write access to a victim's non-default OPFS storage buckets. An attacker could launder a stolen transfer token through IndexedDB to obtain a handle bound to their own origin but pointing to the victim's bucket.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 5 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 without the security team.

Overview: A compromised renderer can potentially gain cross-origin read/write access to a victim's non-default OPFS storage buckets. By laundering a stolen FileSystemAccessTransferToken through IndexedDB, an attacker can bypass origin checks because FileSystemAccessManagerImpl::DeserializeHandle fails to verify bucket ownership when deserializing handles.

Affected files:

  • content/browser/file_system_access/file_system_access_manager_impl.cc
  • storage/browser/file_system/obfuscated_file_util.cc
  • storage/browser/quota/quota_manager_impl.cc
  • storage/browser/file_system/file_system_url.h
  • content/browser/indexed_db/instance/bucket_context.cc

Estimated timestamp from git blame: 2023-02-24

Summary

A logic flaw in how the File System Access API deserializes handles from IndexedDB could allow a compromised renderer to gain unauthorized cross-origin access to a victim's non-default Origin Private File System (OPFS) storage buckets.

When a FileSystemHandle representing a file in a non-default storage bucket is serialized (e.g., when saved to IndexedDB), the browser stores the physical bucket_id but relies on the context (the IndexedDB instance's Storage Key) to determine ownership during deserialization. If an attacker can force the browser to serialize a victim's token into the attacker's IndexedDB, the subsequent deserialization process will combine the attacker's Storage Key with the victim's bucket_id without verifying ownership, resulting in a "laundered" handle that bypasses origin checks.

Potential Exploit Steps

Note: These steps represent a theoretical exploit chain based on code analysis; a functional proof-of-concept has not been executed.

  1. Prerequisites: An attacker compromises a renderer process (Origin B). A victim origin (Origin A) obtains a handle to a file in its non-default OPFS bucket and sends it to Origin B via postMessage('*').
  2. Token Interception: The compromised renderer for Origin B receives the FileSystemAccessTransferToken Mojo remote and bypasses normal renderer-side checks that would drop cross-origin tokens.
  3. Storage (Serialization): The compromised renderer initiates a transaction to store this token remote in its own IndexedDB. In the browser process, FileSystemAccessManagerImpl::SerializeHandle handles this by extracting the victim's bucket_id from the URL and saving it to a protobuf (FileSystemAccessHandleData). The StorageKey is intentionally omitted from the serialized data.
  4. Retrieval (Deserialization): The attacker reads the stored record from IndexedDB. This triggers FileSystemAccessManagerImpl::DeserializeHandle in the browser process.
  5. Missing Ownership Verification: DeserializeHandle is called with the attacker's StorageKey (Origin B) and the serialized protobuf containing the victim's bucket_id. It calls QuotaManagerImpl::GetBucketById to resolve the bucket. Crucially, GetBucketById fetches the bucket information but does not verify that the retrieved bucket actually belongs to Origin B's StorageKey.
  6. Token Laundering: The callback in DeserializeHandle applies the victim's BucketLocator to a new FileSystemURL that holds the attacker's StorageKey. It then mints a new FileSystemAccessTransferTokenImpl. Because it uses Origin B's StorageKey, the new token is bound to Origin B's origin, effectively laundering it.
  7. Security Bypass and Access: The attacker redeems the laundered token. The browser's defense-in-depth check (IsValidTransferToken) passes because the token's origin now matches the attacker's origin. Subsequent file I/O operations (e.g., getFile()) are routed by ObfuscatedFileUtil using the bucket() field of the URL, granting the attacker read/write access to the victim's physical OPFS directory on disk.

Suggested Fix

In FileSystemAccessManagerImpl::DeserializeHandle (content/browser/file_system_access/file_system_access_manager_impl.cc), explicitly verify that the BucketInfo retrieved from GetBucketById belongs to the storage_key provided to the deserialization method.

C++
        context_->quota_manager_proxy()->GetBucketById(
            storage::BucketId::FromUnsafeValue(data.sandboxed().bucket_id()),
            base::SequencedTaskRunner::GetCurrentDefault(),
            base::BindOnce(
                [](storage::FileSystemURL url, const blink::StorageKey& expected_storage_key,
                   base::OnceCallback<void(const storage::FileSystemURL&)> callback,
                   storage::QuotaErrorOr<storage::BucketInfo> result) {
                  if (!result.has_value() || result->storage_key != expected_storage_key) {
                    // Drop `token`, and directly return.
                    return;
                  }
                  url.SetBucket(result->ToBucketLocator());
                  std::move(callback).Run(url);
                },
                url, storage_key, std::move(bucket_callback)));

Evaluated with Chrome root at commit: e9e0fcbb690b1a8c1a26c81c2a9ea23d6e178368


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. 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 deserialisation function fails to verify that the bucket retrieved by ID actually belongs to the storage key of the requesting origin.

Impact

A compromised renderer could gain read/write access to a victim's non-default OPFS storage buckets, but the exploit is theoretical and has not been demonstrated.

What the attacker needed

Attacker compromises a renderer process; victim origin sends handle via postMessage; attacker bypasses renderer-side checks

The fix

The fix should add an explicit check in `DeserializeHandle` that the retrieved bucket's storage key matches the expected storage key, dropping the token if not.

How it was found

  1. A victim origin obtains a handle to a file in its non-default OPFS bucket and sends it to a compromised renderer via postMessage.
  2. The compromised renderer receives the transfer token and bypasses renderer-side checks that would normally drop cross-origin tokens.
  3. The compromised renderer stores the token in its own IndexedDB, causing the browser to serialise the handle and save the victim's bucket ID without the storage key.
  4. The attacker reads the stored record from IndexedDB, triggering deserialisation in the browser process.
  5. The deserialisation fetches the bucket by ID but does not verify ownership, then creates a new token bound to the attacker's origin.
  6. The attacker redeems the laundered token and performs file I/O operations that access the victim's physical OPFS 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.

The File System Access API lets web apps work with files on your disk, and it uses special tokens to keep different websites separate. This report found that if an attacker can trick the browser into storing a victim's token in the attacker's own storage, the browser later forgets to check that the token really belongs to the attacker's site. That means the attacker could read and write files in the victim's private storage area.

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.