Policy bypass in WebView (CVE-2026-11178)
When an Android WebView app enables a specific cookie interception setting, the browser process manually injects all cookies, including SameSite=Strict and HttpOnly ones, into intercepted requests. If the app does not override the request, this injected header bypasses the network stack's SameSite and credentials:omit enforcement, allowing a malicious cross-site page to leak sensitive cookies.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 50 days
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: If an Android WebView app enables setIncludeCookiesOnIntercept, the browser process intercepts requests and manually injects all cookies (including SameSite=Strict and HttpOnly) into the request headers. If the app does not override the request, this manually injected header bypasses the network stack's standard SameSite enforcement and credentials: omit directives, allowing malicious cross-site pages to leak sensitive cookies.
Affected files:
android_webview/browser/network_service/aw_proxying_url_loader_factory.ccandroid_webview/browser/aw_cookie_access_policy.ccnet/url_request/url_request_http_job.ccservices/network/public/cpp/header_util.ccservices/network/url_loader_util.cc
Estimated timestamp from git blame: 2025-09-30
Technical Analysis
A potential vulnerability exists in Android WebView where sensitive cookies can be leaked to cross-site network requests, bypassing SameSite=Strict and HttpOnly protections. This occurs when an application opts into WebSettingsCompat.setIncludeCookiesOnIntercept(true) and enables third-party cookies via setAcceptThirdPartyCookies(true).
-
Over-permissive Cookie Retrieval: When a request is intercepted,
AwProxyingURLLoaderFactory::InterceptedRequest::Restart()inandroid_webview/browser/network_service/aw_proxying_url_loader_factory.cccallsGetCookieHeader(). This function queries theCookieManagerusingnet::CookieOptions::MakeAllInclusive(). This explicitly setsexclude_httponlyto false and the SameSite context toSAME_SITE_STRICT, effectively retrieving every cookie associated with the request URL regardless of the actual request context (e.g., cross-site vs. same-site). -
Header Injection: The retrieved cookies are formatted into a standard HTTP Cookie line string and injected directly into
request_.headersviaInterceptWithCookieHeader(). This injection is not gated onrequest.credentials_modeor the actual SameSite relationship between the initiator and the target. -
Bypass of Network Stack Protections: If the application's
shouldInterceptRequestcallback returnsnull(no override), the mutated request containing the manually injectedCookieheader is forwarded to the innernetwork::URLLoaderFactory(typicallyCorsURLLoader).Cookieis not currently in thekUnsafeHeaderslist inservices/network/public/cpp/header_util.cc, soCorsURLLoaderdoes not strip it from the IPC payload.- In
net/url_request/url_request_http_job.cc, if a request is made withcredentials: 'omit'(or cross-origin withSameSite=Strictcookies), the network stack's standard cookie logic determines no cookies should be added from the store. Because the stack has no new cookies to add, it never attempts to overwrite the existing, manually injectedCookieheader. - The
HttpNetworkTransactionthen merges these extra headers and sends the request, successfully transmitting the protected cookies.
Potential Impact
An attacker-controlled page loaded in an affected WebView can perform cross-site requests (e.g., using fetch with mode: 'no-cors', credentials: 'omit' or via <img> tags) that will inadvertently include the victim site's SameSite=Strict and HttpOnly cookies. This defeats CSRF protections and allows for credential leakage, bypassing browser isolation boundaries.
Preconditions
- The host application must call
WebSettingsCompat.setIncludeCookiesOnIntercept(true). - The host application must call
CookieManager.setAcceptThirdPartyCookies(true). - The application's
shouldInterceptRequestmust returnnullfor the targeted URL.
Suggested Reproduction Steps (Theoretical)
Note: Our tooling agent does not have the ability to run code, so these are potential reproduction steps based on code analysis.
- Build an Android app that embeds WebView and calls
WebSettingsCompat.setIncludeCookiesOnIntercept(webSettings, true),CookieManager.getInstance().setAcceptThirdPartyCookies(webView, true), and registers aWebViewClientwhoseshouldInterceptRequest()returnsnull. - In that WebView, load
https://victim.example/loginand have the server setsession=SECRET; HttpOnly; Secure; SameSite=Strict. - Navigate the WebView to
https://attacker.example/which serves:<script>fetch('https://victim.example/account/transfer?to=attacker&amount=1000', {mode:'no-cors', credentials:'omit'});</script>. - On
victim.example, observe that the incoming request carriesCookie: session=SECRETeven though the request is cross-site, credentials were omitted, and the cookie isSameSite=Strict.
Suggested Fix
If AwProxyingURLLoaderFactory decides to forward the request to the network stack without an application-provided override (ContinueAfterIntercept), it should explicitly strip the Cookie header it injected from request_.headers before calling target_factory_->CreateLoaderAndStart(). This ensures the network stack naturally evaluates and applies the correct cookies based on SameSite rules and credentials mode.
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
Likely the WebView interception code retrieves cookies with an all-inclusive policy and injects them into request headers without checking the request's credentials mode or SameSite context, and the network stack later fails to strip or overwrite that header.
What the attacker needed
App enables setIncludeCookiesOnIntercept; App enables setAcceptThirdPartyCookies; shouldInterceptRequest returns null; Victim site sets SameSite=Strict cookies
The fix
The WebView interception code should strip the Cookie header it injected before forwarding the request to the network stack when the app does not override the request, so the network stack applies normal SameSite and credentials rules.
How it was found
- Build an Android app that embeds WebView, enables setIncludeCookiesOnIntercept and setAcceptThirdPartyCookies, and registers a WebViewClient whose shouldInterceptRequest returns null.
- Load a victim login page in that WebView and have the server set a session cookie with HttpOnly, Secure, and SameSite=Strict.
- Navigate the WebView to an attacker page that runs a cross-site fetch with mode no-cors and credentials omit.
- Observe that the request to the victim carries the session cookie despite being cross-site and omitting 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.
Cookies are small pieces of data that websites store in your browser to remember you, like a session token. SameSite=Strict and HttpOnly are security flags that stop other websites from reading or sending those cookies. This report says that in a special Android WebView setup, the app itself adds all cookies to requests before the normal security checks happen, so a malicious page could trick the WebView into sending your secret cookies to another site.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.