Skip to content
Race condition Advisory Advanced CVE-2026-87433

Race condition in FileAPI (CVE-2026-87433)

A compromised renderer could retain a writable file handle for a large blob and send a null modification timestamp, causing the browser to skip integrity checks. This allowed tampering with blob data after validation, potentially leading to XSS or violating Site Isolation.

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.

Overview: A compromised renderer can bypass blob immutability by retaining a writable file handle provided by the browser during large blob creation. By sending a null modification timestamp during finalization, the renderer disables subsequent browser-side integrity checks, allowing post-validation data tampering.

Affected files:

  • storage/browser/blob/blob_transport_strategy.cc
  • storage/browser/blob/blob_memory_controller.cc
  • storage/browser/file_system/local_file_stream_reader.cc
  • storage/browser/blob/blob_data_item.h
  • storage/browser/blob/write_blob_to_file.cc

Estimated timestamp from git blame: 2021-05-15

Summary

The Chrome Blob storage system relies on immutability as a core security invariant to prevent cross-origin data tampering and Time-of-Check to Time-of-Use (TOCTOU) vulnerabilities. However, when handling large blobs that require disk-backed storage, the browser passes a writable OS file handle to the renderer and relies on a flawed timestamp mechanism to detect subsequent modifications. A compromised renderer can exploit this to tamper with blob data after the browser has finalized and validated it.

Vulnerability Details

  1. Writable Handle Transfer: When a blob is too large to fit in memory, BlobMemoryController::CreateEmptyFiles creates a temporary file with base::File::FLAG_WRITE and base::File::AddFlagsForPassingToUntrustedProcess. This writable handle is sent to the renderer via the BytesProvider::RequestAsFile Mojo call.
  2. Null Timestamp Bypass: After writing the data, the renderer replies to the browser with the file's last modification time via a std::optional<base::Time>. In FileTransportStrategy::OnReply, the browser checks if (!time_file_modified). If the renderer sends a non-null std::optional containing a null base::Time (value 0), this check passes, and the null time is stored in the BlobDataItem.
  3. Validation Short-Circuit: Later, when the blob is read by a consumer (e.g., navigating to a blob: URL or reading via IndexedDB), LocalFileStreamReader uses FileStreamReader::VerifySnapshotTime to ensure the file hasn't been modified. This function contains the following logic: return expected_modification_time.is_null() || ...; Because the stored time is null, the check unconditionally returns true, completely bypassing the file integrity verification.

Impact

A compromised renderer can break the immutability of any large blob it creates. This allows an attacker to:

  • Pass initial browser-side security checks (e.g., MIME type sniffing, Safe Browsing) with benign data.
  • Silently overwrite the file with malicious data (e.g., an HTML payload) using the retained writable handle.
  • Trigger a read from a higher-privileged context or a different origin (via blob: URL navigation or postMessage), leading to Cross-Site Scripting (XSS) or delivery of tampered files, effectively violating Site Isolation.

Potential Reproduction Steps

Note: These are suggested/potential steps derived from code analysis, as our tooling agent does not currently have the ability to execute code or run a working Proof of Concept.

  1. Compromise a renderer process (e.g., via a standard V8 bug).
  2. Use the standard Web API to create a large Blob (e.g., > 5MB) to force disk-backed storage.
  3. Intercept the BytesProvider::RequestAsFile Mojo call in the compromised renderer.
  4. Write benign data to the provided base::File handle, but retain a copy of the writable file descriptor (e.g., using dup()).
  5. Reply to the browser's callback with a std::optional<base::Time> containing base::Time().
  6. The browser finalizes the Blob and considers it immutable.
  7. Use the retained file descriptor to overwrite the file on disk with a malicious payload.
  8. Cause a victim frame or process to read the Blob (e.g., via window.open(blob_url)).

Suggested Fix

  1. Reject Null Timestamps: Update FileTransportStrategy::OnReply to explicitly reject null timestamps. if (!time_file_modified || time_file_modified->is_null()).
  2. Harden Verification: FileStreamReader::VerifySnapshotTime should treat a null expected_modification_time as a verification failure when validating immutable blobs.
  3. Revoke Write Access: If possible, the browser should avoid trusting the renderer's modification time entirely. The browser could close its handle, wait for the renderer to finish, and then re-open the file in read-only mode, or use OS-level file sealing (like memfd_create with F_ADD_SEALS on Linux) to strictly enforce immutability at the OS level.

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from 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 browser accepted a null modification time from the renderer and treated it as a valid value, causing the integrity check to always pass.

Impact

A compromised renderer could break blob immutability, potentially leading to XSS or delivery of tampered files, though the text notes this is a potential issue and the reproduction steps are suggested, not executed.

What the attacker needed

Compromised renderer process; ability to create large blobs

The fix

The browser should reject null timestamps and treat a null expected modification time as a verification failure, and ideally enforce immutability at the OS level.

How it was found

  1. Compromise a renderer process.
  2. Create a large blob to force disk-backed storage.
  3. Intercept the file request call in the compromised renderer.
  4. Write benign data but keep a copy of the writable file descriptor.
  5. Reply with a null modification time.
  6. Overwrite the file with malicious data using the retained descriptor.

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 blob is a chunk of data a web page can create, and the browser promises it will not change once made. Here, a malicious page could keep a way to edit that data after the browser checked it, then swap in harmful content. This could let an attacker run scripts in another site's context.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.