Confused deputy in DataTransfer (CVE-2026-87582)
A compromised renderer on macOS could abuse the ClipboardHost Mojo interface to read arbitrary local files and escape the sandbox. By writing a file URL to the clipboard and then reading it back after a user click, the renderer could obtain read permissions and a DataTransferToken for any file on disk.
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. 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 compromised renderer on macOS can potentially achieve an arbitrary file read and escape the sandbox by abusing the ClipboardHost Mojo interface. By sending a local file URL via WriteBookmark and then reading it back via ReadFiles after a user click, the renderer can trick the browser into granting it read permissions and a DataTransferToken to any file on the disk.
Affected files:
ui/base/clipboard/clipboard_util_mac.mmcontent/browser/renderer_host/clipboard_host_impl.ccui/base/clipboard/clipboard_mac.mmui/base/clipboard/clipboard_util.cccontent/browser/file_system/browser_file_system_helper.cccontent/browser/file_system_access/file_system_access_manager_impl.cccontent/browser/child_process_security_policy_impl.ccthird_party/blink/public/mojom/clipboard/clipboard.mojom
Estimated timestamp from git blame: 2026-03-22
Vulnerability Detail
There is a potential logic flaw in how Chromium handles clipboard operations on macOS, allowing a compromised renderer to bypass the sandbox and read arbitrary local files. The vulnerability stems from a lack of validation in ClipboardHost.WriteBookmark combined with automatic file promotion logic in the macOS clipboard implementation.
The attack leverages two distinct phases:
1. Write Phase (Staging the File)
- A compromised renderer calls the
ClipboardHost.WriteBookmarkMojo IPC method with afile://URL pointing to a sensitive file (e.g.,file:///Users/victim/.ssh/id_rsa). ClipboardHostImpl::WriteBookmark(content/browser/renderer_host/clipboard_host_impl.cc:623) receives this string and passes it directly toclipboard_writer_->WriteURL()without validating the scheme or verifying if the renderer has permission to access the file.- On macOS, the write operation eventually reaches
clipboard_util::PasteboardItemsFromUrls(ui/base/clipboard/clipboard_util_mac.mm:326). - Here, the unsandboxed browser process checks if the URL is a file and if it exists (
url.isFileURL && [url checkResourceIsReachableAndReturnError:nil]). Because the browser is unsandboxed, this check succeeds for any existing local file. The browser then promotes the string to anNSPasteboardTypeFileURLon the macOS system pasteboard.
2. Read Phase (Exfiltration)
- The compromised renderer waits for a minor user interaction (e.g., a single click anywhere on the page) to satisfy
IsRendererPasteAllowed(which relies onWebContents::HasRecentInteraction()). - The renderer sends the
ClipboardHost.ReadFiles(kStandard)IPC call. - The browser reads the
NSPasteboardTypeFileURLfrom the system pasteboard. Believing the user genuinely copied a file via the OS UI, the browser blindly grants the renderer process read access viaChildProcessSecurityPolicyImpl::GrantReadFile. - A File System Access
DataTransferTokenis generated and returned to the renderer. - The renderer redeems this token (which bypasses sensitive directory checks in
ResolveDataTransferTokenWithFileTypebecause it is a file handle, not a directory) and reads the file contents, completing the sandbox escape.
Potential Reproduction Steps
Note: These are suggested/potential steps to trigger the vulnerability. Our tooling agent does not currently have the ability to run code or execute a live proof-of-concept.
- From a compromised renderer process on macOS, initiate a Mojo IPC call:
ClipboardHost.WriteBookmark("file:///Users/<user>/.ssh/id_rsa", "title"). - Send a
ClipboardHost.CommitWrite()IPC message to flush the URL to the OS clipboard. - Pause execution and wait for any user interaction (e.g., an arbitrary click on the page surface) to satisfy the 5-second
HasRecentInteraction()window. - Send a
ClipboardHost.ReadFiles(kStandard)IPC call. - Receive the Mojo response containing a
DataTransferFileentry with a validfile_system_access_token. - Redeem the token via the File System Access API (e.g.,
getFile()) to read the raw contents of the user's SSH key.
Suggested Fix
- Input Validation: In
ClipboardHostImpl::WriteBookmark, explicitly validate the URL scheme. If the URL is afile://scheme, the browser must check if the renderer process already has read access to that specific file path viaChildProcessSecurityPolicyImpl. If it does not, the request should be rejected or the process terminated. - Policy Enforcement: Consider routing
WriteBookmarkthroughIsClipboardCopyAllowedByPolicyto align it withWriteText,WriteHtml, andWriteImage. - macOS Clipboard Hardening: In
clipboard_util::PasteboardItemsFromUrls, avoid promotingfile://URLs toNSPasteboardTypeFileURLwhen the data originates from an untrusted web origin.
Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad
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
Likely, the browser does not validate that the renderer has permission to access a file before promoting a file URL to a system clipboard file type and later granting read access based on that clipboard entry.
What the attacker needed
Compromised renderer on macOS; user clicks on the page
The fix
The browser should validate that the renderer already has read access to a file before allowing a file URL to be written to the clipboard, and should avoid promoting file URLs from untrusted origins to system clipboard file types.
How it was found
- From a compromised renderer, call ClipboardHost.WriteBookmark with a file URL pointing to a sensitive file.
- Send ClipboardHost.CommitWrite to flush the URL to the OS clipboard.
- Wait for a user interaction (e.g., a click) to satisfy the recent interaction check.
- Send ClipboardHost.ReadFiles to read the file URL from the clipboard.
- Receive a DataTransferFile entry with a valid file_system_access_token.
- Redeem the token via the File System Access API to read the file contents.
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 compromised renderer is a part of the browser that has been taken over by an attacker. The clipboard is the copy-paste buffer. The report says that by putting a file path on the clipboard and then reading it back, the attacker could trick the browser into giving access to any file on the computer, even though the attacker should not have that access.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.