Inappropriate implementation in Chromoting (CVE-2026-7994)
The Chrome Remote Desktop Windows host writes a file into a user-controlled directory while running as SYSTEM without impersonating the user, and a time-of-check to time-of-use race lets a local attacker redirect that write. An unprivileged local attacker could potentially truncate or create arbitrary system files, leading to full SYSTEM compromise.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 33 days
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 potential local privilege escalation vulnerability exists in the Chrome Remote Desktop (CRD) Windows host due to unsafe file operations in the WebAuthn extension notifier. The SYSTEM-privileged remoting_desktop.exe process writes files to a user-controlled directory without impersonation, exposing a Time-of-Check to Time-of-Use (TOCTOU) race condition. An unprivileged local attacker could potentially exploit this using oplocks and NTFS junctions to arbitrarily create or truncate system files, leading to full SYSTEM compromise.
Affected files:
remoting/host/webauthn/remote_webauthn_extension_notifier.ccremoting/host/desktop_session_agent.ccremoting/host/desktop_session_proxy.ccremoting/host/webauthn/remote_webauthn_message_handler.cc
Estimated timestamp from git blame: 2024-08-27
Summary
In Chrome Remote Desktop for Windows, the remoting_desktop.exe process runs as SYSTEM in the interactive user's session. To signal WebAuthn extensions, RemoteWebAuthnExtensionNotifier::Core::WakeUpExtension() writes a 1-byte NUL file to specific paths inside the interactive user's %LOCALAPPDATA% directory.
Because this operation runs as SYSTEM without impersonating the interactive user, and because of a Time-of-Check to Time-of-Use (TOCTOU) flaw in the directory verification, a local unprivileged user can potentially redirect this file write to an arbitrary location on the file system.
Technical Details
The vulnerability stems from the implementation of RemoteWebAuthnExtensionNotifier::Core::WakeUpExtension():
- Lack of Impersonation: The thread writes to a user-controlled directory (
%LOCALAPPDATA%\...\WebAuthenticationProxyRemoteSessionStateChange) using theremoting_desktop.exeprocess'sSYSTEMtoken. No impersonation (e.g.,ImpersonateLoggedOnUser) occurs. - TOCTOU Race Condition: The code calls
base::DirectoryExists(dir)to verify the target directory outside of a loop that iterates over multiple extension IDs. - Unsafe File Creation: Inside the loop, it uses
base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITEwithout specifying flags to prevent traversing reparse points.
Because there are multiple extension IDs written sequentially, an attacker can use a standard Windows "Bait-and-Switch" oplock attack to pause the execution between the directory check and the second file write, swapping the directory for an NTFS junction.
Potential Exploitation Steps
Note: These are suggested steps; a working proof of concept has not yet been executed in our tooling environment.
- Setup Bait: As an unprivileged interactive user, create the target directory:
%LOCALAPPDATA%\Google\Chrome\User Data\WebAuthenticationProxyRemoteSessionStateChange. - Set Oplock: Create a file named after the first WebAuthn extension ID (e.g.,
djjmngfglakhkhmgcfdmjalogilepkhd) and place an Exclusive Oplock on it usingFSCTL_REQUEST_OPLOCK. - Trigger: Initiate a CRD connection negotiating the
kRemoteWebAuthnCapability. This prompts theSYSTEMprocess to write the extension files. - Pause Execution: The
SYSTEMprocess callsbase::DirectoryExists(), which succeeds. It then attempts to open the first extension file. This triggers the oplock, pausing theSYSTEMthread. - The Switch: While the thread is paused, the attacker renames the
WebAuthenticationProxyRemoteSessionStateChangedirectory. - Create Junction: The attacker creates an NTFS junction at the original
WebAuthenticationProxyRemoteSessionStateChangepath, pointing it to the Windows Object Manager namespace\RPC Control. - Create Symlink: Inside
\RPC Control, the attacker creates an Object Manager symbolic link named after the second extension ID (e.g.,inomeogfingihgjfjlpeplalcfajhgai), pointing to a protected target file like\??\C:\Windows\System32\target_file.dll. - Release Oplock: The attacker releases the oplock. The
SYSTEMthread resumes, finishes the first file, and moves to the second. - Arbitrary Write: The
SYSTEMthread attempts to write the second file. The kernel redirects the path through the junction and symlink. Because the thread runs asSYSTEMand usesFLAG_CREATE_ALWAYS, it bypasses ACLs, truncating the target DLL to 0 bytes and writing a single NUL byte. This primitive is a known vector for fullSYSTEMLocal Privilege Escalation.
Suggested Fix
- Use Impersonation: The most robust fix is to impersonate the interactive user before performing any file operations in the
%LOCALAPPDATA%directory. This ensures theSYSTEMprocess cannot write anywhere the unprivileged user cannot already write. - Avoid Junction Traversal: If impersonation is not feasible, use
base::File::FLAG_WIN_OPEN_REPARSE_POINT(or equivalent) to ensureCreateFiledoes not traverse unexpected junctions or symlinks when operating on user-controlled directories.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
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 SYSTEM process performs file operations in a user-writable directory without impersonating the user and without opening files in a way that refuses to follow junctions or symlinks, and it checks the directory only once before writing several files.
Impact
An unprivileged local attacker could potentially truncate or create arbitrary system files as SYSTEM, which could lead to full SYSTEM privilege escalation; the report notes that a working proof of concept has not yet been executed.
What the attacker needed
Local unprivileged user account; Chrome Remote Desktop Windows host installed; ability to start a CRD connection
The fix
The report suggests impersonating the interactive user before any file operations in the user's local app data, or opening files with a flag that prevents following junctions and symlinks.
How it was found
- As an unprivileged user, create the WebAuthenticationProxyRemoteSessionStateChange directory under the user's local app data.
- Create a file named after the first extension ID and place an exclusive oplock on it.
- Start a Chrome Remote Desktop connection that negotiates the remote WebAuthn capability, causing the SYSTEM process to write extension files.
- When the SYSTEM process opens the first file, the oplock pauses it; rename the directory and replace it with an NTFS junction to the RPC Control namespace.
- Create an object manager symbolic link named after the second extension ID that points to a protected target file.
- Release the oplock so the SYSTEM process resumes and writes through the junction and symlink to the target file.
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.
Chrome Remote Desktop runs a helper program with the highest Windows privileges (SYSTEM). That program creates a small marker file inside a folder the normal user controls. Because it checks the folder and then writes later, a user can swap the folder for a shortcut (a junction) in between, so the privileged program writes somewhere it should not, such as a system file.
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.