Integer overflow in CredentialProvider (CVE-2026-11058)
An integer wrap in the Google Credential Provider for Windows (GCPW) email domain extraction allows an attacker to bypass the domain allowlist by supplying an email without an '@' character. Combined with mishandled network errors, this lets a compromised GCPW sign-in process create a persistent local Windows account with an attacker-controlled password.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 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 security team.
Overview: An integer wrap in the Google Credential Provider for Windows (GCPW) email extraction logic allows an attacker to bypass domain restrictions. Supplying an email without an '@' character causes the entire string to be treated as the domain. When combined with insufficient error handling, this allows a compromised GCPW sign-in process to create a persistent local Windows account with an attacker-controlled password.
Affected files:
chrome/credential_provider/gaiacp/gaia_credential_base.ccchrome/credential_provider/gaiacp/win_http_url_fetcher.ccchrome/credential_provider/gaiacp/gcp_utils.ccchrome/credential_provider/gaiacp/os_user_manager.cc
Estimated timestamp from git blame: 2026-01-25
Summary
An integer wrap vulnerability in the Google Credential Provider for Windows (GCPW) allows an attacker to bypass the domain allowlist check. This occurs because the code incorrectly extracts the domain from an email address when the '@' character is missing. This bypass, combined with insufficient error handling in network responses and user lookup logic, allows an attacker who has compromised the restricted GCPW Logon Sign-in (GLS) process to create a new local Windows account with an attacker-controlled password, resulting in a sandbox escape and local privilege escalation (LPE).
Vulnerability Details
1. Integer Wrap in Domain Extraction
In CGaiaCredentialBase::OnUserAuthenticated (running as SYSTEM inside LogonUI.exe), the email domain is extracted from the GLS-supplied JSON using the following logic:
const std::wstring email = GetDictString(*properties, kKeyEmail);
const std::wstring email_domain = email.substr(email.find(L"@") + 1);
When the email string does not contain an '@' character, email.find(L"@") returns std::wstring::npos (defined as static_cast<size_t>(-1)). Due to unsigned integer arithmetic, npos + 1 wraps to 0. Consequently, email.substr(0) is executed, which returns the entire email string as the email_domain.
2. Domain Allowlist Bypass
An attacker can provide a string that matches an entry in the domains_allowed_to_login list (e.g., "contoso.com") as the email field without including an '@' character. The extraction logic will treat "contoso.com" as the domain, satisfying the allowlist check at gaia_credential_base.cc:2505:
if (!std::ranges::contains(allowed_domains, email_domain)) { ... }
3. Network and Lookup Error Mishandling
Following the bypass, ValidateOrCreateUser relies on the Google Admin SDK to fetch user information (FindExistingUserSidIfAvailable). The attacker provides a valid token for an unrelated account, allowing the initial token fetch to succeed. However, the subsequent Admin SDK query fails because "contoso.com" is not a valid user.
Crucially, the network and JSON parsing layers fail to handle the API error correctly:
WinHttpUrlFetcher::Fetchignores HTTP 4xx/5xx status codes and returnsS_OKas long as it receives a response.SearchForListInStringDictUTF8attempts to parse the error response. Finding the expected JSON paths missing, it gracefully does nothing and returnsS_OKwith an empty account list.FindExistingUserSidIfAvailableobserves the empty lists and returnsNTE_NOT_FOUND.- In
MakeUsernameForAccount(gaia_credential_base.cc:539),NTE_NOT_FOUNDis not treated as a fatal error. Instead, the code falls back to the local user creation logic.
4. Attacker-Controlled Account Creation
Because the system falls back to new user creation, OSUserManager::Get()->CreateNewUser is invoked with a sanitized version of the fake email (e.g., contoso_com) and the password extracted from the attacker's JSON (kKeyPassword). This silently creates a persistent local Windows user with known credentials, granting full interactive access.
Potential Exploitation Steps
(Note: These are potential steps as our tooling agent does not have code execution capabilities to verify a full PoC.)
- The attacker exploits a vulnerability in the WebView renderer running within the restricted
gaiauser context during the GCPW sign-in phase. - From the compromised renderer, the attacker writes a malicious JSON payload to the stdout pipe connected to the elevated
LogonUI.exe. - The JSON payload specifies
email: "contoso.com"(matching an allowed domain but lacking an@), alongside a chosenpasswordand valid tokens obtained from an attacker-controlled Google account. - GCPW parses the payload, bypasses the domain check due to the integer wrap, misinterprets the subsequent API failures as a user without existing mappings, and provisions a new Windows local account with the attacker's password.
- The attacker gains interactive access to the machine, bypassing the sandbox and escalating privileges.
Suggested Fix
- Safely extract the email domain by ensuring an '@' character is actually present:
size_t at_pos = email.find(L"@");
if (at_pos == std::wstring::npos) {
// Handle error: invalid email format
return E_FAIL;
}
const std::wstring email_domain = email.substr(at_pos + 1);
- Enforce HTTP status code validation in
WinHttpUrlFetcher::Fetchto propagate API errors correctly. - Ensure
MakeUsernameForAccountcorrectly validates that the provided email string matches a valid email format before falling back to local account creation.
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 code uses the result of find('@') without checking for npos, causing an integer wrap that makes substr(0) return the whole string as the domain, and error handling in network and user lookup functions fails to treat API failures as fatal.
Impact
A compromised GCPW sign-in process could create a persistent local Windows account with an attacker-controlled password, leading to sandbox escape and local privilege escalation.
What the attacker needed
Compromised GCPW sign-in process; valid tokens from attacker-controlled Google account
The fix
The email domain should be extracted only after verifying that an '@' character is present, and HTTP status codes should be validated to propagate API errors correctly.
How it was found
- The attacker exploits a vulnerability in the WebView renderer running within the restricted `gaia` user context during the GCPW sign-in phase.
- From the compromised renderer, the attacker writes a malicious JSON payload to the stdout pipe connected to the elevated `LogonUI.exe`.
- The JSON payload specifies `email: "contoso.com"` (matching an allowed domain but lacking an `@`), alongside a chosen `password` and valid tokens obtained from an attacker-controlled Google account.
- GCPW parses the payload, bypasses the domain check due to the integer wrap, misinterprets the subsequent API failures as a user without existing mappings, and provisions a new Windows local account with the attacker's password.
- The attacker gains interactive access to the machine, bypassing the sandbox and escalating privileges.
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 sign in with an email address, the software splits it at the '@' symbol to get the domain part (like 'example.com'). If there is no '@', the code makes a mistake and treats the whole string as the domain, so a fake email like 'contoso.com' passes the check that only allows certain domains. Then, because other errors are ignored, the system creates a new local Windows user with a password the attacker chooses.
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.