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

Race condition in WebProtect (CVE-2026-78991)

A race condition in Chrome's clipboard handling allows a compromised renderer to bypass Enterprise Data Loss Prevention (DLP) checks. An attacker can write benign data to the clipboard while a slow image read is occurring, priming a cache that subsequently allows the sensitive image data through uninspected.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 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 Chrome Security team. Please see go/chrome-ai-generated-security-bugs-faq for more information.

Overview: A race condition in Chrome's clipboard handling allows a compromised renderer to bypass Enterprise Data Loss Prevention (DLP) checks. An attacker can write benign data to the clipboard while a slow image read is occurring, priming a cache that subsequently allows the sensitive image data through uninspected.

Affected files:

  • chrome/browser/enterprise/data_protection/paste_allowed_request.cc
  • content/browser/renderer_host/clipboard_host_impl.cc
  • content/public/browser/clipboard_types.cc

Estimated timestamp from git blame: 2024-04-26

Summary

A Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in Chrome's clipboard processing that can allow a compromised renderer to bypass Enterprise Data Loss Prevention (DLP) content analysis when reading images from the clipboard.

The issue stems from the fact that reading an image from the clipboard (e.g., via ReadPng) is an asynchronous operation that may involve slow background-thread encoding. However, the sequence number used to cache the DLP policy decision is fetched after this asynchronous work finishes. A malicious renderer can exploit this window to modify the clipboard content, triggering a fast, benign policy check that caches an "allowed" verdict. When the slow image encoding finally completes, it re-uses this newly cached "allowed" verdict, permitting the sensitive image data to be delivered without inspection.

Detailed Analysis

  1. Initiating a Slow Read: The user copies a confidential image (e.g., a bitmap) to the OS clipboard. The clipboard is currently at sequence number S1. A compromised renderer calls navigator.clipboard.read() or uses direct Mojo access to send a ReadPng message to the browser.
  2. Background Processing: ClipboardHostImpl::ReadPng initiates a read from the OS clipboard. On Windows (features::kNonBlockingOsClipboardReads) or standard Non-Backed clipboards, reading a bitmap and converting it to PNG format involves dispatching a time-consuming task to a background base::ThreadPool (ui/base/clipboard/clipboard_win.cc:814). The UI thread does not block and continues processing Mojo messages.
  3. The Race (Writing Benign Data): While the background encoding task is running, the renderer sends a WriteSmartPasteMarker message followed by a CommitWrite message. Unlike WriteText, these specific write methods do not trigger asynchronous policy checks and immediately commit to the clipboard (content/browser/renderer_host/clipboard_host_impl.cc:597). This updates the OS clipboard state and increments the global sequence number to S2.
  4. Priming the Cache: The renderer immediately sends a ReadText message. Because the clipboard now only contains a smart paste marker, ExtractText quickly returns an empty string. The browser proceeds to check DLP policies for this empty text by calling PasteIfPolicyAllowed (content/browser/renderer_host/clipboard_host_impl.cc:833).
  5. Caching the Benign Verdict: PasteIfPolicyAllowed captures the current OS sequence number, which is now S2. It initiates an Enterprise Content Analysis request. The check concludes that an empty string is safe and calls PasteAllowedRequest::Complete (chrome/browser/enterprise/data_protection/paste_allowed_request.cc:153). This populates the cache in RequestsMapStorage with an "allowed" entry for sequence number S2 containing empty data.
  6. The Bypass: Eventually, the original background task encoding the confidential PNG completes. Execution resumes on the UI thread at ClipboardHostImpl::OnReadPngWithText (content/browser/renderer_host/clipboard_host_impl.cc:401), which bundles the sensitive PNG data into a ClipboardPasteData object.
  7. Re-fetching the Sequence Number: OnReadPngWithText calls PasteIfPolicyAllowed. Crucially, this function calls GetSequenceNumber again. Since the clipboard hasn't changed since step 3, it receives S2.
  8. Data Merging: PasteAllowedRequest::StartPasteAllowedRequest is called with the sensitive PNG data and the sequence number S2. It finds the completed, "allowed" cache entry from step 5. Because the entry is marked complete, it skips the DLP scan and immediately calls request.InvokeCallback(...).
  9. Delivery: Inside InvokeCallback, the incoming sensitive data is merged with the cached data (data.Merge(data_)). Because the cached data consists of empty fields, the Merge function (content/public/browser/clipboard_types.cc:41) leaves the sensitive PNG data intact. The callback delivers the confidential image directly to the attacker's renderer.

Impact

A compromised renderer or malicious web application with clipboard read permissions could reliably extract confidential images or other data types from the clipboard, bypassing active Enterprise DLP content analysis policies.

Suggested Fix

The root cause is that PasteIfPolicyAllowed retrieves the clipboard sequence number at the end of the read pipeline, rather than capturing the sequence number that was associated with the data when it was originally extracted from the OS clipboard.

The ui::Clipboard::ReadPng (and related async read functions) should be modified to return the sequence number that was current when the read began. This captured sequence number should then be passed down the callback chain to ClipboardHostImpl::OnReadPng -> ExtractText -> OnReadPngWithText -> PasteIfPolicyAllowed. This ensures the DLP cache key strictly matches the generation of the data being analyzed.

Evaluated with Chrome root at commit: 661452647ddb2827305122ff3273bd5dea403f09


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.

Raised in root component due to access or custom field issues on 1208119

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

The DLP policy decision cache key uses the clipboard sequence number fetched after asynchronous image encoding completes, rather than the sequence number at the time the data was originally read.

Impact

A compromised renderer or malicious web application with clipboard read permissions could reliably extract confidential images or other data types from the clipboard, bypassing active Enterprise DLP content analysis policies.

What the attacker needed

Compromised renderer; clipboard read permissions; Enterprise DLP enabled

The fix

The fix should modify async read functions to return the sequence number at the start of the read and pass it through the callback chain so the DLP cache key matches the data generation.

How it was found

  1. User copies a confidential image to the clipboard.
  2. Compromised renderer sends a ReadPng message to the browser.
  3. While background encoding runs, renderer sends WriteSmartPasteMarker and CommitWrite to change clipboard content.
  4. Renderer sends ReadText, which quickly returns empty string and triggers a DLP check that caches an 'allowed' verdict for the new sequence number.
  5. Background encoding completes and the sensitive PNG data is bundled.
  6. PasteIfPolicyAllowed re-fetches the sequence number, finds the cached 'allowed' entry, and delivers the sensitive image without inspection.

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 you copy something, Chrome checks if it's allowed to be pasted. This check can be tricked: while Chrome is slowly preparing an image, an attacker quickly writes harmless data, causing Chrome to remember 'this is safe'. Then the original sensitive image is delivered without being checked.

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.