Skip to content
Access control Advisory Advanced CVE-2026-13924

Insufficient validation of untrusted input in WebView (CVE-2026-13924)

AwProxyingRestrictedCookieManager trusted the renderer-supplied site_for_cookies parameter when enforcing WebView's third-party cookie policy. A compromised renderer could spoof this value to bypass setAcceptThirdPartyCookies(false) and SameSite cookie protections, allowing cross-site tracking and reading or writing SameSite cookies.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 52 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: AwProxyingRestrictedCookieManager incorrectly trusts the renderer-supplied site_for_cookies parameter to enforce WebView's third-party cookie policy. A compromised renderer can spoof this parameter to bypass setAcceptThirdPartyCookies(false) and additionally bypass SameSite cookie protections.

Affected files:

  • android_webview/browser/network_service/aw_proxying_restricted_cookie_manager.cc
  • android_webview/browser/aw_content_browser_client.cc
  • android_webview/browser/aw_cookie_access_policy.cc
  • services/network/restricted_cookie_manager.cc

Estimated timestamp from git blame: 2026-04-13

Description

In Android WebView, AwProxyingRestrictedCookieManager (running in the browser process) acts as a proxy for RestrictedCookieManager (running in the network process). Its purpose is to enforce WebView-specific cookie policies, primarily the per-WebView setAcceptThirdPartyCookies() API, as the network service itself is not globally configured to block third-party cookies for WebView.

However, AwProxyingRestrictedCookieManager incorrectly trusts renderer-supplied Mojo parameters, specifically site_for_cookies, when determining if a request should be treated as first-party or third-party. When a renderer invokes Mojo methods such as GetAllForUrl, SetCanonicalCookie, or GetCookiesString, it provides its own site_for_cookies value. The proxy passes this value to AllowCookies(), which consults AwCookieAccessPolicy::CanAccessCookies() to decide whether the access should be allowed or if third-party cookies should be disabled.

A compromised renderer running in a third-party context (e.g., https://tracker.example embedded within https://victim.example) can spoof site_for_cookies to match its own requested url. This causes the proxy's IsFirstParty() check to evaluate to true, tricking the proxy into treating the request as first-party. The proxy then forwards the request to the underlying RestrictedCookieManager in the network process with disable_3pcs = false (or force_disable_third_party_cookies = false).

While the network process's RestrictedCookieManager::ValidateAccessToCookiesAt detects that the renderer-supplied site_for_cookies does not match the securely bound IsolationInfo, it currently only logs an ERROR and proceeds with the request as long as the URL matches the bound origin (due to a known issue tracked in crbug.com/402207912).

Consequently, the network service processes the request using the attacker's spoofed site_for_cookies. This not only bypasses the WebView-specific third-party cookie block but also incorrectly calculates the SameSite context in MakeOptionsForGet/MakeOptionsForSet. By making the spoofed site_for_cookies match the URL, the network service evaluates the context as SAME_SITE_STRICT, allowing the cross-site attacker to read and write SameSite=Lax and SameSite=Strict cookies.

Impact

This vulnerability allows a compromised renderer to:

  1. Bypass the setAcceptThirdPartyCookies(false) policy configured by the Android application developer, enabling cross-site tracking.
  2. Bypass SameSite cookie protections, allowing a compromised third-party frame to read and write SameSite=Lax and SameSite=Strict cookies for its own origin.

Potential Exploitation Steps

Note: These are suggested steps based on static analysis.

  1. An Android application configures a WebView and calls CookieManager.setAcceptThirdPartyCookies(webview, false).
  2. The WebView loads https://victim.example, which embeds a third-party iframe to https://tracker.example.
  3. An attacker achieves Remote Code Execution (RCE) in the sandboxed renderer process for the tracker.example iframe.
  4. From the compromised renderer, the attacker crafts a Mojo IPC to RestrictedCookieManager::GetCookiesString.
  5. The attacker sets url=https://tracker.example and spoofs site_for_cookies=https://tracker.example.
  6. The browser process proxy (AwProxyingRestrictedCookieManager) evaluates the spoofed site_for_cookies, determines it is a first-party request, and passes disable_3pcs = false to the network service.
  7. The network service logs an error about the site_for_cookies mismatch but continues execution. It uses the spoofed value to compute a SAME_SITE_STRICT context.
  8. The network service returns the cookies for tracker.example (including SameSite cookies), successfully bypassing both the third-party cookie block and SameSite restrictions.

Suggested Fix

  1. Proxy Enforcement: AwProxyingRestrictedCookieManager should not trust the site_for_cookies parameter provided by the renderer over Mojo. AwContentBrowserClient::WillCreateRestrictedCookieManager receives the trusted IsolationInfo. It should pass the trusted site_for_cookies from the IsolationInfo to the constructor of AwProxyingRestrictedCookieManager, and the proxy should use this trusted value for all policy evaluations instead of the renderer-supplied arguments.
  2. Network Service Enforcement: Address the TODO in RestrictedCookieManager::ValidateAccessToCookiesAt (crbug.com/402207912) to return false and trigger a ReportBadMessage when the renderer's site_for_cookies does not match the BoundSiteForCookies(), rather than just logging an error.

Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 browser-process proxy trusted the renderer-supplied site_for_cookies parameter instead of using the securely bound IsolationInfo, and the network service only logged a mismatch rather than rejecting it.

Impact

A compromised renderer could bypass the app's third-party cookie policy and SameSite protections, enabling cross-site tracking and unauthorised reading or writing of SameSite cookies.

What the attacker needed

Android app uses WebView with third-party cookies disabled; Attacker compromises the renderer process; Victim loads a page with a third-party iframe

The fix

The proxy should use the trusted site_for_cookies from IsolationInfo instead of the renderer-supplied value, and the network service should reject mismatches with ReportBadMessage rather than only logging an error.

How it was found

  1. An Android app configures a WebView and disables third-party cookies.
  2. The WebView loads a page that embeds a third-party iframe.
  3. The attacker compromises the renderer process for that iframe.
  4. The attacker sends a crafted IPC request to the cookie manager with a spoofed site_for_cookies value.
  5. The browser proxy treats the request as first-party and forwards it with third-party cookie blocking disabled.
  6. The network service logs a mismatch but returns the cookies, including SameSite cookies.

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.

A WebView is a browser window inside an Android app. The app can tell it not to accept cookies from other websites, but the code that checks this trusted a value supplied by the web page's rendering process. If an attacker can take over that process, they can lie about which site they are, so the check passes and cookies that should be blocked are allowed.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.