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

Race condition in Editing (CVE-2026-95360)

Blink's default paste handling does not check that the clipboard sequence number still matches the one captured at the user's paste gesture, because its snapshot is lazy and falls back to live reads. A page could block the paste handler and then insert clipboard content copied after the gesture, potentially exfiltrating it.

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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: The default DOM paste processing path in Blink potentially fails to validate that the clipboard sequence number matches the original gesture-time sequence number. By delaying execution during the synchronous paste event handler, an attacker could potentially allow a user or external process to update the clipboard with sensitive information. When default paste processing eventually runs, it retrieves and inserts the updated clipboard content, potentially allowing cross-origin data exfiltration.

Affected files:

  • third_party/blink/renderer/core/editing/commands/clipboard_commands.cc

Estimated timestamp from git blame: 2023-03-03

Summary of the Issue

In Blink, the default DOM paste processing path (implemented in ClipboardCommands::GetFragmentFromClipboard() and ClipboardCommands::PasteAsPlainTextFromClipboard()) does not validate that the clipboard sequence number matches the original gesture-time sequence number. This potentially allows a malicious webpage to access and exfiltrate clipboard content written after the user's paste gesture (such as sensitive passwords, HTML markup, or screenshots) by delaying execution during the synchronous paste event handler.

Root Cause

When a user initiates a paste command (e.g., via Ctrl+V), ClipboardCommands::Paste() is invoked in third_party/blink/renderer/core/editing/commands/clipboard_commands.cc. The sequence of events is as follows:

  1. A ScopedSystemClipboardSnapshot is created on the stack (line 560). However, this snapshot is a lazy cache: it is initialized empty and only gets populated upon the first read of each format.
  2. The synchronous JS paste event is dispatched. At this point, only image/png is eagerly pre-read into the snapshot during DataTransfer::OnItemListChanged(), while string types (HTML, plain text, RTF) are not.
  3. The renderer thread can be blocked by a synchronous script in the page's paste event listener (up to the browser's interaction timeout of 5 seconds).
  4. If the clipboard contents change during this delay, the sequence number increments to a new value (say, M).
  5. Once the JS paste handler finishes, control flows to ClipboardCommands::PasteFromClipboard() and then to default-processing reads like ClipboardCommands::GetFragmentFromClipboard() or ClipboardCommands::PasteAsPlainTextFromClipboard().
  6. GetFragmentFromClipboard() calls methods such as ReadHTML() or ReadPlainText() on SystemClipboard. Because the lazy snapshot does not contain these formats, it falls back to making live IPC requests (ReadHtml / ReadText) to the browser process.
  7. These live IPCs retrieve the updated clipboard contents (at sequence M), bypassing the sequence-number validations that protect the JS-exposed DataObjectItem sinks (implemented as part of crbug.com/501920294 on line 216 of third_party/blink/renderer/core/clipboard/data_object_item.cc). The browser-side gate (IsRendererPasteAllowed in content/browser/renderer_host/clipboard_host_impl.cc) only verifies that there was a recent user interaction (which remains valid because the delay is under the 5-second timeout), rather than validating the clipboard sequence number.

Potential Steps to Trigger the Issue

Note: These are potential steps to reproduce, as our automated tooling agent does not have the ability to run code or execute a live proof of concept.

  1. Create a webpage containing a <div id="editor" contenteditable="true"> element.

  2. Attach a synchronous paste listener that blocks execution for about 4.5 seconds:

    JavaScript
    const editor = document.getElementById('editor');
    editor.addEventListener('paste', (e) => {
      const end = performance.now() + 4500;
      while (performance.now() < end) {}
    });
    
  3. Attach an input event listener to exfiltrate the DOM content:

    JavaScript
    editor.addEventListener('input', () => {
      console.log('Exfiltrated data: ' + editor.innerHTML);
    });
    
  4. As a user, copy some benign placeholder text (e.g., "hello"), focus the editor, and press Ctrl+V.

  5. During the 4.5-second UI freeze, copy some sensitive text (e.g., a password) from another application.

  6. Observe if the sensitive content copied after the paste gesture is inserted into the editor and exfiltrated.

Suggested Fix

Ensure that default DOM paste processing validates the current clipboard sequence number against the sequence number captured at the time of the paste gesture. Alternatively, ensure that the clipboard snapshot is fully populated/locked with the gesture-time clipboard content before dispatching the paste event, preventing any fallback to live IPCs for subsequently modified clipboard states.

Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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 clipboard snapshot taken at gesture time is lazy and only pre-reads images, so later default-processing reads fall back to live IPC reads of the current clipboard without re-checking the sequence number.

Impact

A malicious page could potentially capture clipboard content the user copied after the paste gesture, but only if the delay stays under the browser's roughly five-second interaction timeout, and the report is unverified with no live proof of concept.

What the attacker needed

Victim visits attacker page; victim pastes into the page; victim copies new data within ~5 seconds

The fix

Default paste processing should validate the current clipboard sequence number against the gesture-time one, or fully populate the snapshot before dispatching the paste event.

How it was found

  1. Create a page with an editable div.
  2. Add a synchronous paste listener that blocks for about 4.5 seconds.
  3. Add an input listener that logs the editor content.
  4. Copy benign text, focus the editor and press paste.
  5. During the freeze, copy sensitive text from another application.
  6. Check whether the later-copied content is inserted and logged.

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 press paste, the browser is meant to insert what was on the clipboard at that moment. Here the browser only saves some clipboard formats up front and fetches the rest later, so if the clipboard changes in between, the newer content gets pasted instead. A malicious page could freeze itself during the paste event and then read whatever the user copied next.

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.