Skip to content
Race condition Advisory Advanced CVE-2026-131006

Race condition in CredentialProvider (CVE-2026-131006)

A local non-privileged attacker can pre-create a directory as an NTFS junction to bypass DACL hardening, then swap the junction during a synchronous network fetch so that GCPW's SYSTEM-level file write follows the junction and overwrites an arbitrary system file with JPEG data.

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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A potential local privilege escalation exists in GCPW's post-signin worker running as SYSTEM. An attacker can exploit a TOCTOU race condition during a synchronous network fetch to swap an NTFS junction, bypassing DACL hardening and tricking base::WriteFile into corrupting arbitrary system files.

Affected files:

  • chrome/credential_provider/gaiacp/scoped_user_profile.cc
  • chrome/credential_provider/gaiacp/gaia_credential_base.cc

Estimated timestamp from git blame: Unknown (Google3 checkout)

1. Summary of the Issue (Meant for Human Triage)

A potential local privilege escalation vulnerability exists in Google Credential Provider for Windows (GCPW). During the post-signin sequence, GCPW attempts to retrieve and write the user's Google profile picture to a local directory: C:\Users\Public\AccountPictures\<SID>. This worker operates under the context of NT AUTHORITY\SYSTEM.

Because the default DACL on the parent directory (FOLDERID_PublicUserTiles / C:\Users\Public\AccountPictures) permits local interactive users to write and create subdirectories (NT AUTHORITY\INTERACTIVE:(M)), a local non-privileged attacker can pre-create their own <SID> folder. The GCPW hardening check in CreateDirectoryWithRestrictedAccess() (inside scoped_user_profile.cc) only applies restrictive permissions if the directory does not already exist. If the path exists (base::PathExists returns true), the application skips DACL application entirely.

An attacker can exploit this behavior by pre-creating the subdirectory as an NTFS junction pointing to a valid dummy physical directory. This passes the initial base::PathExists checks, which transparently succeeds on valid NTFS junctions. The attacker then performs a Time-of-Check to Time-of-Use (TOCTOU) swap, replacing the junction with one pointing to the Windows Object Manager namespace (\RPC Control) while GCPW executes a synchronous, blocking network fetch for the profile picture. When GCPW writes the downloaded picture via base::WriteFile, the underlying CreateFileW call lacks FILE_FLAG_OPEN_REPARSE_POINT. The kernel blindly follows the swapped junction and any planted object-manager symlinks, allowing the attacker to truncate and overwrite arbitrary files on the OS as SYSTEM. Since the file content consists of JPEG bytes fetched from Google's CDN, this acts as a highly reliable arbitrary file create/overwrite (delete/corrupt-equivalent) primitive.


2. Proof-of-Concept & Detailed Execution Flow

The following outlines the potential step-by-step sequence an attacker would follow to trigger this vulnerability. Note: our tooling agent cannot execute code on a live Windows machine, so this represents the theorized exploitation steps based on strict code paths.

Phase 1: Attacker Preparation

  1. A local, non-administrative attacker with an interactive session determines their own user SID (e.g., via whoami /user).
  2. The attacker targets the default account pictures directory: C:\Users\Public\AccountPictures (resolved from FOLDERID_PublicUserTiles).
  3. The attacker deletes or renames their own <SID> folder if it already exists.
  4. The attacker creates a physical dummy directory: C:\Users\Public\AccountPictures\dummy.
  5. The attacker creates an NTFS junction for their SID, pointing to the physical dummy directory: mklink /J C:\Users\Public\AccountPictures\<SID> C:\Users\Public\AccountPictures\dummy. This setup bypasses the upcoming path existence check (GetFileAttributes fails on object manager directories like \RPC Control if pointed to directly).
  6. The attacker creates object-manager symlinks for the specific picture sizes GCPW will write to. Using a tool like CreateSymlink.exe, they map \RPC Control\GoogleAccountPicture_32.jpg to the target system file they wish to overwrite (e.g., \??\C:\Windows\System32\target_file.dll).

Phase 2: Triggering the Vulnerable Execution Flow 7. The attacker locks their Windows workstation and initiates a sign-in to their Google account using the GCPW tile on the Windows logon screen (LogonUI.exe). 8. Upon successful sign-in, the GCPW DLL calls CGaiaCredentialBase::ForkPerformPostSigninActionsStub() (chrome/credential_provider/gaiacp/gaia_credential_base.cc:1910). 9. This invokes OSProcessManager::CreateRunningProcess() (chrome/credential_provider/gaiacp/os_process_manager.cc:470). The spawned child process (gcpw-save-account-info) inherits the security token of LogonUI.exe, running with NT AUTHORITY\SYSTEM rights. 10. The child process executes PerformActions() (chrome/credential_provider/gaiacp/gaia_credential_base.cc:2051), which loads the profile and calls profile->SaveAccountInfo(properties) (:2082). 11. This invokes UpdateProfilePictures(sid, picture_url, force_update) (chrome/credential_provider/gaiacp/scoped_user_profile.cc:604).

Phase 3: The Hardening Bypass & TOCTOU Window 12. Inside UpdateProfilePictures(), the code constructs the target directory path: C:\Users\Public\AccountPictures\<SID> (scoped_user_profile.cc:292). 13. At scoped_user_profile.cc:298, the code attempts to secure the directory but is gated by an existence check: if (!base::PathExists(account_picture_path)). 14. Because the attacker's junction points to a valid physical dummy directory, base::PathExists returns true. The CreateDirectoryWithRestrictedAccess() call is skipped entirely. The restrictive DACL logic is bypassed, leaving the attacker's junction intact. 15. The code iterates over kProfilePictureSizes and instantiates a WinHttpUrlFetcher (scoped_user_profile.cc:345). 16. A synchronous HTTPS request is made: hr = fetcher->Fetch(&response); (scoped_user_profile.cc:352). 17. Race Condition Trigger: This blocking network round-trip provides a large, reliable TOCTOU race window. During this delay, the attacker executes a script to rapidly remove the NTFS junction pointing to dummy and replaces it: mklink /J C:\Users\Public\AccountPictures\<SID> \?\GLOBALROOT\RPC Control.

Phase 4: Vulnerable File Write Sink 18. The network fetch completes, storing the JPEG image bytes in the response buffer. 19. The code calls SaveProcessedProfilePictureToDisk() (scoped_user_profile.cc:359), passing a callback to write the file. 20. The callback executes base::WriteFile(picture_path, ...) (scoped_user_profile.cc:366). 21. Inside base/files/file_util_win.cc:1230, base::WriteFile maps to a standard Windows CreateFileW call with CREATE_ALWAYS disposition, using FILE_ATTRIBUTE_NORMAL and crucially lacking the FILE_FLAG_OPEN_REPARSE_POINT flag. 22. Because FILE_FLAG_OPEN_REPARSE_POINT is absent, the Windows kernel traverses the newly swapped junction to \RPC Control and follows the attacker's pre-created object-manager symlink. 23. The target system file (C:\Windows\System32\target_file.dll) is truncated and overwritten with the JPEG image bytes. Since the write occurs in the SYSTEM context with no token impersonation, the attacker successfully corrupts/destroys an arbitrary, highly privileged file on the OS.

Suggested Fix:

  • Ensure directory creation logic enforces restrictive DACLs unconditionally, rather than using base::PathExists to exit early. Explicitly detect if the existing directory is a reparse point (junction) and remove/overwrite it, or fail securely.
  • Consider explicitly using base::File with flags that prevent reparse point following (if feasible on Windows), or verify the resulting file path matches expectations via GetFinalPathNameByHandle after opening the file handle but before writing the buffer.
  • Impersonate the interactive user token when performing the file write rather than relying on the SYSTEM process token.

3. Technical Verification Details (Automated Audit Logs)

Prior Critic Verdict Verbatim:

Critic model verdict (2026-06-15 14:39:08):
*   Severity: Medium (S2)
*   Brief Notes / Reasoning:
    The vulnerability is verified and exploitable, though it requires a loose TOCTOU race not identified in the report. 
    
    **Validation:**
    - **Context:** The GCPW post-signin process is launched via `OSProcessManager::CreateRunningProcess`, which inherits the SYSTEM token from its parent (LogonUI.exe).
    - **Bypass:** `UpdateProfilePictures` attempts to secure the target directory by calling `CreateDirectoryWithRestrictedAccess`. However, it skips this if `base::PathExists(account_picture_path)` returns true. Because `PathExists` resolves NTFS junctions, an interactive user can pre-create the directory as a junction to completely bypass DACL hardening.
    - **Sink:** `base::WriteFile` performs a `CreateFileW` with `CREATE_ALWAYS` and no reparse-point restrictions, blindly following junctions and object-manager symlinks to overwrite arbitrary files.
    
    **Correction to Report (TOCTOU Requirement):**
    The report claims no race is required by pointing the NTFS junction directly to `\?\GLOBALROOT\RPC Control`. However, `GetFileAttributes` (used by `PathExists`) fails on object-manager directories like `\RPC Control` because they do not support file information queries. This would cause `PathExists` to return false, falling through to `CreateDirectory`, which would fail and abort the process. 
    To exploit this, the attacker must use a TOCTOU approach: point the junction to a valid dummy directory to pass the `PathExists` checks, then swap the junction to `\RPC Control` during the massive time window provided by the synchronous network request (`fetcher->Fetch(&response)`) that occurs right before the file write.
    
    **Severity Justification:**
    - Starts at **High (S1)** per the Local LPE rubric: Arbitrary file write as SYSTEM via a Chrome-shipped component (GCPW).
    - **-1 Downgrade (to Medium / S2):** The written content is the profile picture fetched from Google's CDN. Since Google re-encodes uploaded profile pictures, the attacker cannot drop a functional PE payload. This acts functionally as a delete/corrupt primitive, triggering the 'delete-only' downgrade clause.
    - No other mitigators apply. Final Rating: **Medium (S2)**.

Codebase Investigator Ledger:

  • Sink Translation Confirmed: The investigator confirmed that base::WriteFile(const FilePath&, std::string_view) (base/files/file_util.cc:505) delegates to base::WriteFile(const FilePath&, span<const uint8_t>) (base/files/file_util_win.cc:1228). The implementation at base/files/file_util_win.cc:1230-1232 invokes CreateFileW with CREATE_ALWAYS and FILE_ATTRIBUTE_NORMAL but does not include FILE_FLAG_OPEN_REPARSE_POINT.
  • PathExists Handling of Junctions Confirmed: The investigator confirmed base::PathExists evaluates GetFileAttributes() directly. For an NTFS directory junction, GetFileAttributes successfully retrieves the attributes of the reparse point itself, causing PathExists to return true on the junction, completing the DACL bypass logic.

Evaluated with Chrome root at commit: 8c517fbcbb533e59ec9cedac868c8a9bdc30beb2


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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

The directory hardening is skipped when the path already exists, and the later file write does not use FILE_FLAG_OPEN_REPARSE_POINT, so a swapped junction is followed.

Impact

The attacker could corrupt or delete arbitrary system files as SYSTEM, but cannot write a functional executable because the content is a re-encoded JPEG from Google's CDN.

What the attacker needed

Local interactive Windows session; non-administrative user account; ability to create junctions and symlinks; GCPW installed and configured

The fix

The directory creation should enforce restrictive DACLs unconditionally, detect and reject reparse points, and the file write should avoid following reparse points or verify the final path.

How it was found

  1. Determine the user's SID and target the public account pictures directory.
  2. Create a dummy physical directory and an NTFS junction for the SID pointing to it.
  3. Create object-manager symlinks mapping the picture filenames to a target system file.
  4. Sign in via GCPW so the post-signin worker runs as SYSTEM and starts a synchronous network fetch.
  5. During the fetch, swap the junction to point to the RPC Control namespace.
  6. The completed fetch writes JPEG bytes through the junction, overwriting the target system 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.

On Windows, a junction is like a shortcut that makes one folder point to another. The Google sign-in helper runs with high system privileges and writes a profile picture into a folder that normal users can also write to. Because it checks the folder before writing but does not re-check during a slow network download, an attacker can swap the folder to point at a sensitive system file, and the helper overwrites that file with picture data.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.