Insufficient policy enforcement in Clipboard (CVE-2026-3938)
Two clipboard read methods in Chromium's ClipboardHostImpl did not check whether the renderer was allowed to paste, so a compromised renderer could read clipboard data without permission. An attacker with a compromised renderer could access sensitive clipboard contents.
- Fix shipped in 60 days
Steps to reproduce the problem
STEPS TO REPRODUCE:
-
Build Chromium content_shell
-
Start HTTP server from the Release directory: cd [chromium_src]/out/Release python -m http.server 8888
-
Copy the attached PoC files (poc.html, victim.html) to the Release directory
-
Open victim.html in NORMAL Chrome browser: http://localhost:8888/victim.html Click "Copy Sensitive Data" to put test data on clipboard
-
Launch content_shell with MojoJS (simulates compromised renderer): .\content_shell.exe --enable-blink-features=MojoJS,MojoJSTest http://localhost:8888/poc.html
VULNERABILITY: In content/browser/renderer_host/clipboard_host_impl.cc:
- ReadAvailableCustomAndStandardFormats() (line 607)
- ReadUnsanitizedCustomFormat() (line 616)
These methods do not call IsRendererPasteAllowed() before accessing clipboard.
Other Read methods (ReadText, ReadHtml, ReadImage, etc.) do have this check.
Related: Issue 40051481 addressed similar clipboard permission bypass.
Problem Description
In content/browser/renderer_host/clipboard_host_impl.cc, two methods access clipboard data without calling IsRendererPasteAllowed():
ReadAvailableCustomAndStandardFormats() (line 607) ReadUnsanitizedCustomFormat() (line 616) Other Read methods in the same file do call IsRendererPasteAllowed() before accessing clipboard data:
ReadText() ReadHtml() ReadSvg() ReadRtf() ReadPng() ReadFiles() ReadDataTransferCustomData() Historical Context:
The custom format methods were added in September 2021 (commit 8aa9dc97 - "[Clipboard API] Clipboard Custom Formats implementation Part 7"). Issue 40051481 was fixed in October 2022, which added IsRendererPasteAllowed() checks to clipboard read methods. However, ReadAvailableCustomAndStandardFormats() and ReadUnsanitizedCustomFormat() were not updated as part of that fix.
Affected Code: void ClipboardHostImpl::ReadAvailableCustomAndStandardFormats( ReadAvailableCustomAndStandardFormatsCallback callback) { // No IsRendererPasteAllowed() check std::vectorstd::u16string format_types = ui::Clipboard::GetForCurrentThread() ->ReadAvailableStandardAndCustomFormatNames(...); std::move(callback).Run(std::move(format_types)); }
void ClipboardHostImpl::ReadUnsanitizedCustomFormat( const std::u16string& format, ReadUnsanitizedCustomFormatCallback callback) { // No IsRendererPasteAllowed() check // ... reads clipboard data directly }
Additional Comments
These methods were added in September 2021 (commit 8aa9dc97) without IsRendererPasteAllowed() checks. When Issue 40051481 was fixed in October 2022, the permission check was added to other clipboard read methods but these two custom format methods were not included. This is an incomplete fix of Issue 40051481 rather than a regression.
The W3C Clipboard API spec Section 7.3.1 requires read() to run "check clipboard read permission" (Section 9.1.1) before accessing clipboard data. If the check fails, the operation must reject with NotAllowedError. The vulnerable methods bypass this requirement.
Reference: https://w3c.github.io/clipboard-apis/#dom-clipboard-read
Summary
ClipboardHost custom format methods bypass IsClipboardPasteAllowed (Issue 40051481 incomplete)
Custom Questions
Reporter credit:
vicevirus
Additional Data
Category: Security
Chrome Channel: Not sure
Regression: No \
Context
Chrome's Clipboard API lets a page read and write clipboard data, and the browser side of that API lives in content/browser/renderer_host/clipboard_host_impl.cc. Because the renderer is the untrusted side of the sandbox, the browser process is expected to gate every clipboard read on a permission check before it touches the system clipboard. The report concerns two methods in that file, ReadAvailableCustomAndStandardFormats() and ReadUnsanitizedCustomFormat(), which handle the custom and standard format names exposed by the Clipboard API. The weakness class recorded for the issue is insufficient policy enforcement, and the affected component is the Clipboard.
Setup
The researcher needed two things: a normal Chrome browser to act as the victim, and a content_shell build to act as a compromised renderer. The PoC consists of two files, poc.html and victim.html, both served from the same local HTTP server. MojoJS is enabled on the content_shell side so that the renderer can talk to browser-process interfaces directly, which is how a compromised renderer is simulated.
- Build Chromium
content_shell. - Start an HTTP server from the Release directory:
cd [chromium_src]/out/Release
python -m http.server 8888
- Copy the attached PoC files (
poc.html,victim.html) to the Release directory. - Open
victim.htmlin a normal Chrome browser athttp://localhost:8888/victim.htmland click "Copy Sensitive Data" to put test data on the clipboard. - Launch
content_shellwith MojoJS enabled:
.\content_shell.exe --enable-blink-features=MojoJS,MojoJSTest http://localhost:8888/poc.html
The --enable-blink-features=MojoJS,MojoJSTest flag is what exposes the Mojo bindings to page script in the shell, standing in for a renderer that an attacker already controls.
Finding it
The researcher compared the read paths in clipboard_host_impl.cc and noticed that most of them call IsRendererPasteAllowed() before touching clipboard data:
ReadText()ReadHtml()ReadSvg()ReadRtf()ReadPng()ReadFiles()ReadDataTransferCustomData()
Two methods do not:
ReadAvailableCustomAndStandardFormats()(line 607)ReadUnsanitizedCustomFormat()(line 616)
That asymmetry is the whole finding. The custom format methods were added in September 2021 in commit 8aa9dc97 ("[Clipboard API] Clipboard Custom Formats implementation Part 7"). Issue 40051481, which addressed a similar clipboard permission bypass, was fixed in October 2022 and added IsRendererPasteAllowed() checks to the clipboard read methods, but these two custom format methods were not updated as part of that fix. The researcher characterises the result as an incomplete fix of Issue 40051481 rather than a regression.
The relevant code, as quoted in the report:
void ClipboardHostImpl::ReadAvailableCustomAndStandardFormats(
ReadAvailableCustomAndStandardFormatsCallback callback) {
// No IsRendererPasteAllowed() check
std::vector<std::u16string> format_types =
ui::Clipboard::GetForCurrentThread()
->ReadAvailableStandardAndCustomFormatNames(...);
std::move(callback).Run(std::move(format_types));
}
void ClipboardHostImpl::ReadUnsanitizedCustomFormat(
const std::u16string& format,
ReadUnsanitizedCustomFormatCallback callback) {
// No IsRendererPasteAllowed() check
// ... reads clipboard data directly
}
ReadAvailableCustomAndStandardFormats() enumerates the standard and custom format names currently on the clipboard and returns them to the caller. ReadUnsanitizedCustomFormat() takes a format name and reads the corresponding clipboard data directly.
Exploitation
Step 1: Put sensitive data on the clipboard
In a normal Chrome browser, the researcher opens the victim page and clicks "Copy Sensitive Data", which places test data on the system clipboard. This is the data the attack is meant to steal.
Step 2: Run the PoC in a compromised renderer
content_shell is launched with MojoJS enabled and pointed at poc.html. With Mojo bindings available to page script, the PoC can invoke the browser-process clipboard interface directly, the way a renderer that has already been compromised would. Because the two methods above never call IsRendererPasteAllowed(), the calls are not gated on the paste permission.
The report does not include the contents of poc.html or victim.html, so the exact Mojo calls and the format names used are not shown here.
Root cause
The permission check is simply missing from two methods. Every other read path in ClipboardHostImpl calls IsRendererPasteAllowed() first; ReadAvailableCustomAndStandardFormats() and ReadUnsanitizedCustomFormat() go straight to ui::Clipboard::GetForCurrentThread() and read the format names or the data. The existing defence, the paste-permission gate added to the other read methods when Issue 40051481 was fixed, never covered these two because they were added earlier, in September 2021, and were not revisited during that fix.
The W3C Clipboard API specification, Section 7.3.1, requires read() to run "check clipboard read permission" (Section 9.1.1) before accessing clipboard data, and to reject with NotAllowedError if the check fails. The vulnerable methods bypass that requirement. The reference given is https://w3c.github.io/clipboard-apis/#dom-clipboard-read.
Impact
A renderer that has already been compromised can read clipboard format names and custom format data without the paste permission being granted. The report frames the issue as a permission bypass in the browser process's clipboard host, and the severity recorded for it is low. The PoC uses MojoJS in content_shell to simulate a compromised renderer. The report does not describe any further escalation beyond reading the clipboard data.
Fix
The report does not state what change was made. The fix it implies is to add the same IsRendererPasteAllowed() check that the other read methods use to ReadAvailableCustomAndStandardFormats() and ReadUnsanitizedCustomFormat(), so that both fail when the paste permission has not been granted, in line with the specification's requirement to reject with NotAllowedError.
Variants to test
- Audit other browser-process interfaces for methods added before a permission-check fix and never revisited. A positive result is a method that reaches a privileged resource without the check its siblings perform.
- Look for other incomplete fixes of the same issue: enumerate every method in a host class and compare which ones call the authorisation helper. A positive result is a read or write path with no call.
- Test the custom format paths specifically, since they were added as a separate feature and may have escaped later hardening. A positive result is format names or data returned to a renderer that has not been granted paste permission.
- Check whether the same gap exists in other Chromium embedders or in the platform clipboard backends reached through
ui::Clipboard. A positive result is the same unchecked read reachable through a different entry point.
What happened, in plain words
Chrome has a feature called the Clipboard API. An API (Application Programming Interface) is a set of rules that lets one piece of software ask another piece of software to do something, a bit like a restaurant menu: you can only order the dishes that are listed, and the kitchen decides how each order is handled. The Clipboard API lets a web page ask the browser to read from or write to the clipboard, the temporary storage you use when you copy and paste text or images.
Chrome is built in layers. The part that runs web pages is called the renderer, and it is deliberately treated as untrusted, like a guest in your house who is only allowed into certain rooms. The part that manages the whole browser and talks to your operating system is called the browser process, and it is the trusted side, like the homeowner with the keys. Because the renderer is untrusted, the browser process is supposed to check permission every time a page asks to read the clipboard, before it actually touches the real clipboard.
The report is about two functions in the browser process, ReadAvailableCustomAndStandardFormats() and ReadUnsanitizedCustomFormat(), which handle the list of clipboard formats and the reading of custom format data. A function is a named block of code that does one job. The weakness class recorded for the issue is insufficient policy enforcement, which simply means the code does not apply a rule that it is supposed to apply. The affected component is the Clipboard.
Context
Chrome's Clipboard API lets a page read and write clipboard data. The browser side of that API lives in a file called content/browser/renderer_host/clipboard_host_impl.cc. The name tells you where it sits: content is the part of Chromium that renders web content, browser is the trusted browser process, renderer_host is the code that manages renderers, and clipboard_host_impl is the implementation of the clipboard service that renderers talk to.
Because the renderer is the untrusted side of the sandbox, the browser process is expected to gate every clipboard read on a permission check before it touches the system clipboard. A sandbox is a security boundary that keeps one part of a program from freely reaching the rest of the computer, like a playpen. A permission check is a simple question the code asks first: is this caller allowed to do this? If the answer is no, the operation should stop.
The report concerns two methods in that file, ReadAvailableCustomAndStandardFormats() and ReadUnsanitizedCustomFormat(), which handle the custom and standard format names exposed by the Clipboard API. A method is just a function that belongs to a class, a bundle of related code. Clipboard formats are the different shapes clipboard data can take: plain text, HTML, an image, or a custom format that a particular application defines.
Setup
The researcher needed two things: a normal Chrome browser to act as the victim, and a content_shell build to act as a compromised renderer. content_shell is a bare-bones Chromium browser used for testing, without the normal Chrome user interface. A compromised renderer means the attacker already has code running inside the part of the browser that handles a page, which is a serious starting position but not the same as controlling the whole browser.
The PoC, short for proof of concept, consists of two files, poc.html and victim.html, both served from the same local HTTP server. A local HTTP server is a small program on your own computer that hands out web pages to a browser, like a librarian passing books over a desk. MojoJS is enabled on the content_shell side so that the renderer can talk to browser-process interfaces directly, which is how a compromised renderer is simulated. Mojo is Chromium's internal messaging system between its parts, and MojoJS exposes those messages to JavaScript running in the page.
- Build Chromium
content_shell. - Start an HTTP server from the Release directory:
cd [chromium_src]/out/Release
python -m http.server 8888
Line by line: cd [chromium_src]/out/Release changes the current directory to the folder where the built browser and the PoC files live, so the server will serve files from there. python -m http.server 8888 starts Python's built-in web server on port 8888. A port is a numbered door on a computer that a network service listens on. This step is needed so both the victim page and the PoC page can be loaded over HTTP from the same place.
- Copy the attached PoC files (
poc.html,victim.html) to the Release directory. - Open
victim.htmlin a normal Chrome browser athttp://localhost:8888/victim.htmland click "Copy Sensitive Data" to put test data on the clipboard.localhostmeans this same computer, so the page is served by the little server started above. The button writes test data to the real system clipboard. - Launch
content_shellwith MojoJS enabled:
.\content_shell.exe --enable-blink-features=MojoJS,MojoJSTest http://localhost:8888/poc.html
Line by line: .\content_shell.exe runs the test browser executable on Windows. --enable-blink-features=MojoJS,MojoJSTest is a command-line switch that turns on the Mojo bindings for page script, which is what lets the page talk to browser-process interfaces directly. http://localhost:8888/poc.html is the page to load, the attacker's page.
The --enable-blink-features=MojoJS,MojoJSTest flag is what exposes the Mojo bindings to page script in the shell, standing in for a renderer that an attacker already controls. An origin is the combination of scheme, host and port that a browser uses to decide which pages belong together, like an address that says which building and which flat a letter came from.
Finding it
The researcher compared the read paths in clipboard_host_impl.cc and noticed that most of them call IsRendererPasteAllowed() before touching clipboard data. IsRendererPasteAllowed() is the permission check: it asks whether this renderer is allowed to paste, and returns yes or no.
ReadText()ReadHtml()ReadSvg()ReadRtf()ReadPng()ReadFiles()ReadDataTransferCustomData()
Two methods do not:
ReadAvailableCustomAndStandardFormats()(line 607)ReadUnsanitizedCustomFormat()(line 616)
That asymmetry is the whole finding. Most doors have a lock; two do not. The custom format methods were added in September 2021 in commit 8aa9dc97 ("[Clipboard API] Clipboard Custom Formats implementation Part 7"). A commit is a recorded change to a codebase, like an entry in a logbook. Issue 40051481, which addressed a similar clipboard permission bypass, was fixed in October 2022 and added IsRendererPasteAllowed() checks to the clipboard read methods, but these two custom format methods were not updated as part of that fix. The researcher characterises the result as an incomplete fix of Issue 40051481 rather than a regression. A regression is when something that used to work stops working; here nothing broke, the fix simply never covered these two methods.
The relevant code, as quoted in the report:
void ClipboardHostImpl::ReadAvailableCustomAndStandardFormats(
ReadAvailableCustomAndStandardFormatsCallback callback) {
// No IsRendererPasteAllowed() check
std::vector<std::u16string> format_types =
ui::Clipboard::GetForCurrentThread()
->ReadAvailableStandardAndCustomFormatNames(...);
std::move(callback).Run(std::move(format_types));
}
void ClipboardHostImpl::ReadUnsanitizedCustomFormat(
const std::u16string& format,
ReadUnsanitizedCustomFormatCallback callback) {
// No IsRendererPasteAllowed() check
// ... reads clipboard data directly
}
Line by line: void ClipboardHostImpl::ReadAvailableCustomAndStandardFormats( starts the first method, which returns nothing (void) and takes a callback, a function to call later with the answer. The comment // No IsRendererPasteAllowed() check marks the missing permission check. std::vector<std::u16string> format_types = declares a list of text strings to hold the format names. ui::Clipboard::GetForCurrentThread() gets the clipboard object for the current thread, and ->ReadAvailableStandardAndCustomFormatNames(...) asks it for the names of the formats currently on the clipboard. std::move(callback).Run(std::move(format_types)); hands that list back to the caller. The second method, ReadUnsanitizedCustomFormat(, takes a format name and a callback, again has no permission check, and, as the comment says, reads clipboard data directly.
ReadAvailableCustomAndStandardFormats() enumerates the standard and custom format names currently on the clipboard and returns them to the caller. ReadUnsanitizedCustomFormat() takes a format name and reads the corresponding clipboard data directly. Sanitisation means cleaning data before handing it over, for example stripping out anything dangerous.
Exploitation
Step 1: Put sensitive data on the clipboard
In a normal Chrome browser, the researcher opens the victim page and clicks "Copy Sensitive Data", which places test data on the system clipboard. This is the data the attack is meant to steal. Doing this in a normal browser matters because it is the real, trusted clipboard being filled, not a fake one inside the test shell.
Step 2: Run the PoC in a compromised renderer
content_shell is launched with MojoJS enabled and pointed at poc.html. With Mojo bindings available to page script, the PoC can invoke the browser-process clipboard interface directly, the way a renderer that has already been compromised would. Because the two methods above never call IsRendererPasteAllowed(), the calls are not gated on the paste permission.
The report does not include the contents of poc.html or victim.html, so the exact Mojo calls and the format names used are not shown here.
Root cause
The permission check is simply missing from two methods. Every other read path in ClipboardHostImpl calls IsRendererPasteAllowed() first; ReadAvailableCustomAndStandardFormats() and ReadUnsanitizedCustomFormat() go straight to ui::Clipboard::GetForCurrentThread() and read the format names or the data. The existing defence, the paste-permission gate added to the other read methods when Issue 40051481 was fixed, never covered these two because they were added earlier, in September 2021, and were not revisited during that fix.
The W3C Clipboard API specification, Section 7.3.1, requires read() to run "check clipboard read permission" (Section 9.1.1) before accessing clipboard data, and to reject with NotAllowedError if the check fails. A specification is the written rulebook for how a web feature must behave, and NotAllowedError is the standard error a page receives when it is not permitted to do something. The vulnerable methods bypass that requirement. The reference given is https://w3c.github.io/clipboard-apis/#dom-clipboard-read.
Impact
A renderer that has already been compromised can read clipboard format names and custom format data without the paste permission being granted. The report frames the issue as a permission bypass in the browser process's clipboard host, and the severity recorded for it is low. The PoC uses MojoJS in content_shell to simulate a compromised renderer. The report does not describe any further escalation beyond reading the clipboard data.
Fix
The report does not state what change was made. The fix it implies is to add the same IsRendererPasteAllowed() check that the other read methods use to ReadAvailableCustomAndStandardFormats() and ReadUnsanitizedCustomFormat(), so that both fail when the paste permission has not been granted, in line with the specification's requirement to reject with NotAllowedError.
Variants to test
- Audit other browser-process interfaces for methods added before a permission-check fix and never revisited. A positive result is a method that reaches a privileged resource without the check its siblings perform.
- Look for other incomplete fixes of the same issue: enumerate every method in a host class and compare which ones call the authorisation helper. A positive result is a read or write path with no call.
- Test the custom format paths specifically, since they were added as a separate feature and may have escaped later hardening. A positive result is format names or data returned to a renderer that has not been granted paste permission.
- Check whether the same gap exists in other Chromium embedders or in the platform clipboard backends reached through
ui::Clipboard. A positive result is the same unchecked read reachable through a different entry point. An embedder is a program that uses Chromium as its engine, such as another browser built on it.
Glossary
- API: a defined set of rules that lets one piece of software ask another to do something, like a menu of allowed requests.
- Browser process: the trusted part of Chrome that manages the whole browser and talks to the operating system.
- Callback: a function passed to another function so it can be called later with the result.
- Clipboard: the temporary storage used when you copy and paste.
- Clipboard format: the shape clipboard data takes, such as plain text, HTML, an image or a custom format.
- Commit: a recorded change to a codebase.
- Compromised renderer: a renderer that an attacker already controls.
- content_shell: a bare-bones Chromium browser used for testing.
- Custom format: a clipboard format defined by a particular application rather than a standard one.
- Embedder: a program that uses Chromium as its engine.
- Function / method: a named block of code that does one job; a method is a function belonging to a class.
- Insufficient policy enforcement: a weakness where code fails to apply a rule it is supposed to apply.
- Issue 40051481: an earlier Chromium issue about a similar clipboard permission bypass, fixed in October 2022.
- IsRendererPasteAllowed(): the permission check that asks whether a renderer may paste.
- localhost: the name for this same computer.
- Mojo / MojoJS: Chromium's internal messaging system, and the JavaScript bindings that expose it to page script.
- NotAllowedError: the standard error a page receives when it is not permitted to do something.
- Origin: the scheme, host and port combination a browser uses to group pages together.
- Permission check: a question the code asks first to decide whether the caller is allowed to do something.
- PoC: proof of concept, a small demonstration that a vulnerability exists.
- Port: a numbered door on a computer that a network service listens on.
- Regression: when something that used to work stops working.
- Renderer: the part of Chrome that runs web pages, treated as untrusted.
- Sandbox: a security boundary that keeps one part of a program from freely reaching the rest of the computer.
- Sanitisation: cleaning data before handing it over.
- Specification: the written rulebook for how a web feature must behave.
- W3C: the organisation that publishes web standards such as the Clipboard API specification.