Uncontrolled search path element in CredentialProvider (CVE-2026-87530)
During GCPW uninstallation, the relaunch routine creates a temporary directory under the user-writable %TEMP% instead of SystemTemp because an elevation-type check misclassifies a UAC-split administrator. A local attacker at Medium Integrity Level could replace the copied installer or plant a DLL to gain High Integrity Level code execution.
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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: During GCPW uninstallation, RelaunchUninstaller copies and executes gcp_setup.exe from a temporary directory. Due to an elevation-type mismatch in base's admin check, the directory is created under the user-writable %TEMP% directory rather than SystemTemp. A local attacker running at Medium Integrity Level could potentially exploit this to achieve High Integrity Level code execution.
Affected files:
chrome/credential_provider/setup/setup_lib.ccchrome/credential_provider/setup/setup.cc
Estimated timestamp from git blame: 2018-10-04
Summary
There is a potential local privilege escalation (LPE) vulnerability in the Google Credential Provider for Windows (GCPW) installer/uninstaller during the uninstall process. When the uninstaller is relaunched under an elevated context via RelaunchUninstaller, it creates a temporary directory and launches a copy of gcp_setup.exe from that directory. Due to how base::CreateNewTempDirectory evaluates UAC-split administrators, this temporary directory is created within the user-writable %TEMP% directory instead of the secure SystemTemp directory. Furthermore, the uninstaller does not implement strict DLL search path mitigations, leaving it potentially open to DLL hijacking or binary replacement by a lower-privilege process running in the same session.
Root Cause Analysis
In chrome/credential_provider/setup/setup_lib.cc, the function RelaunchUninstaller copies gcp_setup.exe to a temporary directory and executes the copy:
HRESULT RelaunchUninstaller(const base::FilePath& installer_path) {
base::FilePath temp_path;
if (!base::CreateNewTempDirectory(FILE_PATH_LITERAL("gcp"), &temp_path)) { ... }
base::FilePath new_installer_path = temp_path.Append(installer_path.BaseName());
if (!base::CopyFile(installer_path, new_installer_path)) { ... }
...
base::CommandLine cmdline(new_installer_path);
...
base::LaunchOptions options;
options.handles_to_inherit.push_back(this_process_handle_handle);
options.current_directory = temp_path;
base::Process process(base::LaunchProcess(cmdline, options));
}
The temporary directory is resolved in base/files/file_util_win.cc via GetSecureTempDirectory:
bool GetSecureTempDirectory(FilePath* temp_dir) {
...
return internal::IsUserDefaultAdmin()
? PathService::Get(DIR_SYSTEM_TEMP, temp_dir)
: GetTempDir(temp_dir);
}
When a UAC-split administrator authorizes the uninstaller, the process runs with an elevated token of type TokenElevationTypeFull. However, IsUserDefaultAdmin() expects the elevation type to be TokenElevationTypeDefault:
bool IsUserDefaultAdmin() {
...
TOKEN_ELEVATION_TYPE elevation_type = TokenElevationTypeDefault;
::GetTokenInformation(::GetCurrentThreadEffectiveToken(), TokenElevationType, &elevation_type, ...);
return elevation_type == TokenElevationTypeDefault;
}
Because elevation_type is TokenElevationTypeFull, IsUserDefaultAdmin() returns false. This causes GetSecureTempDirectory to fall back to GetTempDir(), creating the directory in C:\Users\<username>\AppData\Local\Temp instead of C:\Windows\SystemTemp.
Since the subdirectory is created with ::CreateDirectory(path, NULL) inside CreateTemporaryDirInDir, it inherits the standard user-writable DACL of %TEMP%, permitting Medium-IL processes running in the same user context to modify, delete, or replace files within it.
Additionally, gcp_setup.exe does not call SetDefaultDllDirectories or load DLLs securely, making it potentially susceptible to DLL side-loading from the application directory.
Potential Exploitation Scenario
An attacker running as a Medium-IL process in the same user session could potentially monitor and exploit the uninstaller relaunch process via the following sequence:
- The attacker monitors
%TEMP%for a directory starting withgcpusing directory change notifications. - Once the directory
temp_pathis created, the High-IL process copiesgcp_setup.exeinto it. - Binary Replacement Method: Utilizing
FILE_DELETE_CHILDpermissions inherited from%TEMP%, the Medium-IL attacker process deletes the High-ILgcp_setup.execopy and replaces it with a malicious executable payload of the same name before it is executed. - DLL Sideloading Method: The attacker writes a malicious DLL (targeting a startup dependency of
gcp_setup.exe) to the same temporary folder. - The original uninstaller launches the newly copied executable via
base::LaunchProcessunder the elevated High-IL context. The system either executes the replaced binary or loads the attacker's planted DLL, resulting in privilege escalation.
(Note: These are potential exploitation steps; our tooling has not executed a live proof-of-concept.)
Recommended Fix
- Configure the
gcp_setupbinary with secure DLL search paths. This can be done by callingSetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32)during initialization insetup.ccor by compiling with/DEPENDENTLOADFLAG:0x800(which is already done forgcp_sfxinchrome/credential_provider/setup/BUILD.gn). - Ensure that temporary directories used for elevated relaunch operations are created with a restricted security descriptor to prevent write or delete operations by lower-privilege processes, or update
IsUserDefaultAdminto correctly handleTokenElevationTypeFullcontexts during elevation.
Evaluated with Chrome root at commit: fb72408a8493c46bc75fae1c70d03daec96b3040
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.
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 admin check expects a default elevation token, so a fully elevated UAC-split administrator is treated as a normal user and the temporary directory falls back to the user-writable %TEMP%.
Impact
A local attacker at Medium Integrity Level could potentially achieve High Integrity Level code execution; the report notes no live proof-of-concept was executed.
What the attacker needed
Local access as a Medium-IL user; same user session as the uninstaller; uninstaller relaunched with elevation
The fix
The binary should use secure DLL search paths and the temporary directory should be created with a restricted security descriptor, or the admin check should handle fully elevated tokens.
How it was found
- Monitor %TEMP% for a directory starting with gcp using directory change notifications.
- Wait for the elevated process to copy gcp_setup.exe into that directory.
- Delete the copied executable and replace it with a malicious one of the same name, or plant a malicious DLL.
- The uninstaller launches the replaced binary or loads the planted DLL under elevated context.
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.
When you uninstall this Google tool on Windows, it briefly copies its installer into a temporary folder and runs that copy with administrator rights. Because of a mistake in how Windows' admin status is checked, that folder ends up somewhere ordinary users can write to. A normal user on the same machine could then swap the installer for their own program, which would run with administrator rights.
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.