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.ccstorage/browser/blob/blob_memory_controller.ccstorage/browser/file_system/local_file_stream_reader.ccstorage/browser/blob/blob_data_item.hstorage/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
- Writable Handle Transfer: When a blob is too large to fit in memory,
BlobMemoryController::CreateEmptyFilescreates a temporary file withbase::File::FLAG_WRITEandbase::File::AddFlagsForPassingToUntrustedProcess. This writable handle is sent to the renderer via theBytesProvider::RequestAsFileMojo call. - 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>. InFileTransportStrategy::OnReply, the browser checksif (!time_file_modified). If the renderer sends a non-nullstd::optionalcontaining a nullbase::Time(value 0), this check passes, and the null time is stored in theBlobDataItem. - Validation Short-Circuit: Later, when the blob is read by a consumer (e.g., navigating to a
blob:URL or reading via IndexedDB),LocalFileStreamReaderusesFileStreamReader::VerifySnapshotTimeto 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 returnstrue, 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 orpostMessage), 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.
- Compromise a renderer process (e.g., via a standard V8 bug).
- Use the standard Web API to create a large Blob (e.g.,
> 5MB) to force disk-backed storage. - Intercept the
BytesProvider::RequestAsFileMojo call in the compromised renderer. - Write benign data to the provided
base::Filehandle, but retain a copy of the writable file descriptor (e.g., usingdup()). - Reply to the browser's callback with a
std::optional<base::Time>containingbase::Time(). - The browser finalizes the Blob and considers it immutable.
- Use the retained file descriptor to overwrite the file on disk with a malicious payload.
- Cause a victim frame or process to read the Blob (e.g., via
window.open(blob_url)).
Suggested Fix
- Reject Null Timestamps: Update
FileTransportStrategy::OnReplyto explicitly reject null timestamps.if (!time_file_modified || time_file_modified->is_null()). - Harden Verification:
FileStreamReader::VerifySnapshotTimeshould treat a nullexpected_modification_timeas a verification failure when validating immutable blobs. - 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_createwithF_ADD_SEALSon 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.
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
- Compromise a renderer process.
- Create a large blob to force disk-backed storage.
- Intercept the file request call in the compromised renderer.
- Write benign data but keep a copy of the writable file descriptor.
- Reply with a null modification time.
- 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.