Inappropriate implementation in DataTransfer (CVE-2026-13874)
A race condition in an experimental clipboard lazy-reading feature lets a page with clipboard-read permission read data the user copies after the initial read authorisation. The change-detection defence is defeated because the clipboard sequence number is captured after an asynchronous format enumeration, so the item is paired with the new sequence number but old formats.
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 without the security team.
Overview: A race condition in the experimental clipboard lazy-reading feature (#defer-os-clipboard-read-call-to-get-type) potentially allows a website to read clipboard data copied by a user after the initial read() authorization. This bypasses the change-detection defense intended to prevent websites from accessing newly copied sensitive data. The vulnerability stems from capturing the clipboard sequence number synchronously after an asynchronous format enumeration step.
Affected files:
third_party/blink/renderer/modules/clipboard/clipboard_promise.ccthird_party/blink/renderer/modules/clipboard/clipboard_item.ccthird_party/blink/renderer/core/clipboard/system_clipboard.cccontent/browser/renderer_host/clipboard_host_impl.cc
Estimated timestamp from git blame: 2026-03-09
Description
A Time-of-Check Time-of-Use (TOCTOU) vulnerability potentially exists in the ReadClipboardDataOnClipboardItemGetType feature (controlled by the #defer-os-clipboard-read-call-to-get-type flag) of the Clipboard API. This feature introduces a lazy-reading mechanism where navigator.clipboard.read() returns a list of ClipboardItem objects, but the actual data for each format is only fetched when getType() is called.
To prevent a malicious site from reading sensitive data (like a password) that a user copies to the clipboard after authorizing a read operation, a change-detection defense was implemented. This defense snapshots the clipboard's sequence number when the ClipboardItem is created and verifies it hasn't changed before performing the actual read in getType().
However, the sequence number is captured at the wrong point in the read() flow:
- When
navigator.clipboard.read()is called, the renderer initiates an asynchronous request to enumerate available formats viaGetSystemClipboard()->ReadAvailableCustomAndStandardFormats(). - The browser-side implementation (
ClipboardHostImpl) reads the OS clipboard format names and returns them via IPC. No sequence number is snapshotted yet. - Upon receiving the format names, the renderer task runs
ClipboardPromise::ResolveRead(), which then makes a synchronous Mojo call toGetSystemClipboard()->SequenceNumber()to establish the baseline for theClipboardItem. - Due to the asynchronous nature of steps 1 and 2, there is a race window between the browser reading the formats and the renderer requesting the sequence number. If the user copies new data to the clipboard during this window (e.g., when switching focus), the
ClipboardItemwill be initialized with the old format names (from state N) but the new sequence number (from state M).
When item.getType() is subsequently called, ClipboardItem::HasClipboardChangedSinceClipboardRead() compares the current system sequence number (M) with the stored sequence number (M). The check passes, and the browser proceeds to read the current clipboard content, which is state M. This defeats the change-detection defense and allows the site to read data the user never intended to share with that specific read() operation.
Potential Attacker Steps
While we don't have a working Proof of Concept yet, an attacker could potentially exploit this by deliberately widening the race window:
- A malicious page obtains
clipboard-readpermission. - The page initiates
navigator.clipboard.read()while focused. - The attacker's JavaScript immediately blocks the renderer's main thread (e.g., using a long-running synchronous
whileloop) to delay the processing of the asynchronous format enumeration callback. - During this delay, the user switches focus to another application and copies sensitive data (e.g., a password).
- The renderer unblocks and processes the callback. The resulting
ClipboardItemis constructed with the new sequence number but the old formats. - The page calls
getType()on the returnedClipboardItem. The change-detection check passes, and the newly copied sensitive data is successfully read.
Impact
A page with clipboard-read permission can read data copied to the clipboard by the user even after they have switched focus away from the page, provided the race is won. This allows for the theft of sensitive information copied from other applications.
Suggested Fix
The sequence number should be captured before or simultaneously with the format enumeration. One approach is to modify the browser-side implementation (ClipboardHostImpl::ReadAvailableCustomAndStandardFormats) to return both the format names and the sequence number in the same IPC response. This ensures the snapshot reflects the state of the clipboard at the exact moment the formats were read.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
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.
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 clipboard sequence number is snapshotted after an asynchronous format enumeration, so the ClipboardItem can pair old format names with a new sequence number.
Impact
A page with clipboard-read permission could read data the user copies after switching focus away, provided the race is won; no working proof of concept exists yet.
What the attacker needed
Clipboard-read permission granted; user copies data during the race window; experimental feature flag enabled
The fix
The sequence number should be captured before or at the same time as the format enumeration, for example by returning both from the same browser-side IPC response.
How it was found
- A malicious page obtains clipboard-read permission.
- The page calls navigator.clipboard.read() while focused.
- The attacker's JavaScript blocks the renderer's main thread to delay the asynchronous format enumeration callback.
- During this delay, the user switches focus and copies sensitive data.
- The renderer unblocks and builds a ClipboardItem with the new sequence number but old formats.
- The page calls getType(); the change-detection check passes and the new data is read.
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 asks to read your clipboard, the browser normally checks that the clipboard has not changed since you gave permission, so a site cannot grab a password you copy later. Here, a timing gap meant the browser recorded the 'current' clipboard state too late, so a site could still read something you copied after switching away. The report is a theoretical finding without a working proof of concept.
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.