
Educational proof-of-concept lab demonstrating CVE-2026-106378, a Chrome macOS sandbox escape via WindowServer keystroke injection from a compromised renderer.
Author: Leisure
This is educational code. It was created solely to study the vulnerability mechanism in an isolated lab environment and is not intended to attack real systems. Use it only on your own machine and your own hardware.
CVE-2026-106378 is a privilege escalation in the Google Chrome sandbox on macOS. An attacker who has already compromised the renderer process can execute arbitrary code outside the sandbox via a crafted HTML page.
| Field | Value |
|---|---|
| Type | Sandbox escape / Execution with Unnecessary Privileges (CWE-250) |
| Platform | Google Chrome on macOS |
| Affected versions | prior to 155.0.8059.39 |
| Fix | Chrome 155.0.8059.39 and later |
| CVSS v3.1 | 8.3 (AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H) |
| Severity (Chromium) | Medium |
| Published | October 6, 2026 |
Root cause: gpu.sb (the Seatbelt profile of Chrome's GPU process) retains the
com.apple.windowserver.active grant, while the renderer profile does not.
Through the private CGSPostKeyboardEvent API from SkyLight.framework, this
allows synthetic keyboard events to be posted directly to WindowServer —
effectively typing into Spotlight, launching apps, and running commands outside
the sandbox. Public write-ups describe this as a "hijacked GPU process injecting
keystrokes on Macs".
A simplified but working chain:
website in browser → local server (Bun) → injection via WindowServer
http://127.0.0.1:8730/ is opened./run on the local server.pbcopy), opens Terminal,
and launches the injector.Cmd+V and Enter through CGSPostKeyboardEvent —
Terminal receives the command and executes it.The clipboard route is intentional: injection at the WindowServer level follows the active keyboard layout, so typing symbols directly would produce altered text (e.g. Latin letters coming out as Cyrillic), whereas pasting is layout-independent.
bench/
├── Makefile # target: serve
├── serve.js # local server: /run → pbcopy + Terminal + injection
├── cdp/
│ └── system.js # injector: SkyLight / CGSPostKeyboardEvent via bun:ffi
└── sites/
└── index.html # page that auto-triggers /run on load
Requirements: macOS, Bun, Google Chrome.
make serve # start the server on 127.0.0.1:8730
Then, in another terminal:
make run # open Chrome at the lab page
Or just open http://127.0.0.1:8730/ in a browser.
The command can be set when starting the server:
COMMAND='ls -la' make serve
serve.js
(i.e. your terminal) has the Accessibility permission granted
(System Settings → Privacy & Security → Accessibility). Otherwise Terminal
opens but nothing is pasted.