Race in CredentialProvider (CVE-2026-19139)
The Google Credential Provider for Windows creates its configuration directory with default permissions, allowing unprivileged users to create subdirectories. A TOCTOU race in the startup sentinel logic lets an attacker use a junction point to redirect a SYSTEM-level file open to an attacker-controlled named pipe, enabling theft of the SYSTEM token via named pipe impersonation.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 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 Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: The Google Credential Provider for Windows (GCPW) creates its configuration directory with default permissions, allowing unprivileged users to create subdirectories. A Time-of-Check to Time-of-Use (TOCTOU) vulnerability in the startup sentinel logic can be exploited by an attacker using a junction point to redirect a SYSTEM-level file open to an attacker-controlled named pipe. This allows the attacker to steal the SYSTEM token via named pipe impersonation.
Affected files:
chrome/credential_provider/gaiacp/gcp_utils.ccchrome/credential_provider/gaiacp/dllmain.cc
Estimated timestamp from git blame: 2018-12-19
Summary
A potential Local Privilege Escalation (EoP) vulnerability exists in the Google Credential Provider for Windows (GCPW). A local, unprivileged attacker can potentially gain SYSTEM privileges by exploiting insecure directory permissions combined with a Time-of-Check to Time-of-Use (TOCTOU) race condition in the startup sentinel logic.
Technical Details
GCPW manages a sentinel file located at C:\ProgramData\Google\Credential Provider\<version>\gcpw_startup.sentinel to track crashes. This file is accessed by WriteToStartupSentinel() in chrome/credential_provider/gaiacp/gcp_utils.cc.
The vulnerability relies on two issues:
- Insecure Directory Permissions: The
Credential Providerdirectory inherits default permissions fromC:\ProgramData, allowingBUILTIN\Usersto create new subdirectories. - TOCTOU Race Condition:
WriteToStartupSentinel()is called byDllGetClassObjectrunning withinLogonUI.exeasSYSTEM. It first checks for the directory's existence usingbase::DirectoryExists(), and then opens the sentinel file usingbase::File. Becausebase::Fileon Windows does not specifyFILE_FLAG_OPEN_REPARSE_POINTorSECURITY_SQOS_PRESENT | SECURITY_ANONYMOUSby default, an attacker who swaps the directory for a junction point between the check and the use can redirect the file access to a malicious named pipe withSecurityImpersonationprivileges.
Potential Exploit Scenario
Note: These are proposed steps based on code analysis; a working proof of concept has not been executed.
- An attacker pre-creates the directory
C:\ProgramData\Google\Credential Provider\<version>\as an NTFS junction pointing to a local SMB share (e.g.,\\localhost\C$\attacker_dir). The SMB protocol introduces network latency, significantly widening the race window. - The attacker creates an Object Manager symbolic link at
\RPC Control\gcpw_startup.sentinelpointing to an attacker-controlled named pipe (e.g.,\??\pipe\exploit). - The attacker runs a high-priority thread that rapidly swaps the target of the
<version>junction between the benign SMB path and the malicious\RPC Controldirectory. - The attacker locks the workstation, triggering
LogonUI.exe(SYSTEM) to load GCPW and callWriteToStartupSentinel(). - Time of Check: If the junction points to the benign SMB path,
base::DirectoryExists()succeeds. - Time of Use: The racer thread swaps the junction to
\RPC Control.base::Fileattempts to open the sentinel file withOPEN_ALWAYSandFILE_APPEND_DATA. The kernel follows the junction to\RPC Control\gcpw_startup.sentinel, and then follows the symlink to the attacker's named pipe. LogonUI.execonnects to the named pipe asSYSTEMand writes a "0" byte to it.- The attacker's pipe server receives the connection and calls
ImpersonateNamedPipeClient(), assuming theSYSTEMtoken for Local Privilege Escalation.
Suggested Fix
- Harden Directory Permissions: The GCPW installer should explicitly apply a restrictive DACL to
C:\ProgramData\Google\Credential Provider, preventing unprivileged users from creating subdirectories. - Prevent Impersonation: Consider configuring
base::Fileor the specific file operations in GCPW to use theSECURITY_SQOS_PRESENT | SECURITY_ANONYMOUSflags (orSECURITY_IDENTIFICATION) when opening files in potentially unsafe locations to prevent named pipe impersonation attacks. - Safe Path Traversal: Ensure that file operations in privileged contexts do not inadvertently follow attacker-controlled reparse points.
Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955
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 combination of insecure directory permissions allowing unprivileged subdirectory creation and a TOCTOU race where the privileged process checks a directory then opens a file without preventing reparse point redirection, so an attacker can swap in a junction to a named pipe.
Impact
A local unprivileged attacker could gain SYSTEM privileges, though the report notes that a working proof of concept has not been executed.
What the attacker needed
Local unprivileged access; ability to create junctions and symbolic links; ability to lock the workstation
The fix
The GCPW installer should apply a restrictive DACL to the configuration directory and file operations should use flags that prevent named pipe impersonation, such as SECURITY_SQOS_PRESENT | SECURITY_ANONYMOUS.
How it was found
- Pre-create the version directory as an NTFS junction to a local SMB share to widen the race window.
- Create an Object Manager symbolic link for the sentinel file pointing to an attacker-controlled named pipe.
- Run a high-priority thread that rapidly swaps the junction target between the benign SMB path and the malicious RPC Control directory.
- Lock the workstation to trigger LogonUI.exe (SYSTEM) to load GCPW and call WriteToStartupSentinel().
- During the race, the check sees the benign SMB path while the open follows the junction to the named pipe.
- The attacker's pipe server receives the SYSTEM connection and calls ImpersonateNamedPipeClient() to assume the SYSTEM token.
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.
This report describes a flaw in a Windows login component that runs with high privileges. Because a folder it uses is writable by normal users, an attacker can quickly swap that folder for a shortcut (a junction) that points to a fake communication channel (a named pipe). When the privileged component opens a file, it ends up talking to the attacker's fake channel and hands over its high-level access token, letting the attacker act as the system administrator.
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.