Insufficient validation of untrusted input in Chrome for iOS (CVE-2026-13813)
A logic flaw in the iOS Chrome WebUI scheme handler meant that when a new window's URL was nil, the cross-origin check was skipped entirely. A compromised renderer could spoof the request's main document URL and read sensitive chrome:// resources such as preferences and internal identifiers.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Flapjack, 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: A logic flaw in CRWWebUISchemeHandler allows a compromised renderer process on iOS to bypass cross-origin checks and read sensitive internal browser data. By spoofing the mainDocumentURL of a request in a newly created window where webView.URL is nil, the attacker can bypass validation and access arbitrary chrome:// resources.
Affected files:
ios/web/webui/crw_web_ui_scheme_handler.mmios/web/web_state/ui/wk_web_view_configuration_provider.mm
Estimated timestamp from git blame: 2019-03-18
Description
In iOS Chromium, CRWWebUISchemeHandler manages requests to chrome:// URLs. To determine if a request is authorized, the handler performs two checks:
- WebUI Validation: It verifies that the
mainDocumentURLof the request belongs to a recognized WebUI origin (e.g.,chrome://sync-internals). - Cross-Origin Check: To prevent one WebUI from accessing another's data, it compares the requested URL's origin with the origin of the current
webView.URL.
The vulnerability stems from how the cross-origin check is implemented:
// ios/web/webui/crw_web_ui_scheme_handler.mm
if (!URL.DomainIs(web::kWebUIResourcesHost) && webView.URL &&
url::SchemeHostPort(URL) !=
url::SchemeHostPort(net::GURLWithNSURL(webView.URL))) {
// Block request
}
In Objective-C, nil is falsy. If webView.URL is nil, the entire if condition short-circuits to false, and the access-denied block is skipped entirely.
When a new WKWebView is created (such as when window.open() is called), its URL property is initially nil and remains so until a navigation is fully committed.
Furthermore, the mainDocumentURL property is derived from the NSURLRequest provided by the WKURLSchemeTask, which originates from the (potentially compromised) renderer process via IPC. Since iOS lacks the ChildProcessSecurityPolicy process-level isolation present on desktop platforms, the browser implicitly trusts the renderer's mainDocumentURL for the first validation check.
Potential Attack Path
- An attacker achieves arbitrary code execution within the WebKit WebContent (renderer) process.
- The attacker executes
window.open()to create a newWKWebViewin the browser process. At this moment, theWKWebView'sURLproperty isnil. - Before any navigation commits in the new window, the attacker's renderer initiates a request (e.g., via
fetch) for a sensitive resource likechrome://prefs-internals. - The attacker spoofs the IPC payload, setting the request's
mainDocumentURLto a valid WebUI origin likechrome://sync-internals. - The browser process receives the request in
CRWWebUISchemeHandler. - The first check passes because
chrome://sync-internalsis a valid WebUI. - The cross-origin check evaluates
webView.URL. Since it isnil, the check short-circuits, completely bypassing the security restriction. URLFetcherBlockAdapterexecutes the request using the browser's trustedSharedURLLoaderFactoryand returns the sensitive JSON data directly to the compromised renderer.
Security Impact
Sandbox Escape / Privilege Escalation. A compromised renderer process can bypass process-level security boundaries to read highly sensitive internal browser data across all WebUI components, such as user preferences, emails, and internal device identifiers found in chrome://prefs-internals.
Suggested Fix
The cross-origin check must not fail open when webView.URL is nil. If the webView.URL is nil, the web view has no committed origin and should not be permitted to make cross-origin requests to sensitive chrome:// resources. The logic should be updated to deny access if the origins mismatch or if the webView.URL origin cannot be established for a non-resource request.
Evaluated with Chrome root at commit: cc901875d53bf4e4fe0e01f02843871da4106e70
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 cross-origin check treated a nil webView.URL as a pass because Objective-C nil is falsy, so the condition short-circuited and the deny branch never ran.
Impact
A compromised renderer could escape the sandbox and read sensitive internal browser data across WebUI components, including user preferences, emails and device identifiers.
What the attacker needed
Code execution in the renderer process; iOS Chrome; new window with nil URL
The fix
The cross-origin check should deny access when webView.URL is nil or its origin cannot be established, rather than failing open.
How it was found
- Gain code execution in the WebKit renderer process.
- Call window.open() to create a new WKWebView whose URL is nil.
- Before navigation commits, request a sensitive chrome:// resource from the renderer.
- Spoof the request's mainDocumentURL to a valid WebUI origin.
- The browser's scheme handler passes the WebUI check and skips the cross-origin check because webView.URL is nil.
- The browser fetches the resource and returns the data to the renderer.
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.
Chrome on iOS has special internal pages (chrome:// pages) that hold private browser data. A security check was supposed to stop one page from reading another's data, but it was written so that when a new window had no address yet, the check was skipped. An attacker who already controlled the page-rendering part of the browser could then ask for those private pages and get their contents.
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.