Incorrect authorization in WebView (CVE-2026-87481)
A logic error in the browser's handling of same-document navigation allows a compromised renderer to spoof a file:// origin when universal access from file URLs is enabled. This lets the renderer gain a process-wide exemption and read arbitrary local files, escaping the sandbox.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 5 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 security team.
Overview: A logic error in RenderFrameHostImpl::DidCommitNavigationInternal allows a compromised renderer to spoof its origin during a same-document navigation. When allow_universal_access_from_file_urls is enabled (common in Android WebView), the browser trusts the renderer-provided file:// origin without validation and grants a process-wide security exemption. This allows the compromised renderer to bypass site isolation and read arbitrary local files.
Affected files:
content/browser/renderer_host/render_frame_host_impl.cc
Estimated timestamp from git blame: 2024-12-10
Summary
A potential critical vulnerability exists in RenderFrameHostImpl::DidCommitNavigationInternal where process-wide origin check exemptions are granted to a renderer process based on renderer-supplied parameters before those parameters are rigorously validated. In environments where the allow_universal_access_from_file_urls preference is enabled (frequently used in Android WebView), a compromised renderer can exploit this to gain permanent access to arbitrary local files (file:// origins), effectively escaping the renderer sandbox.
Vulnerability Details
The issue resides in how mojom::DidCommitProvisionalLoadParams are handled during a renderer-initiated same-document navigation.
-
Missing Origin Mismatch Check: When a compromised renderer sends a
DidCommitSameDocumentNavigationIPC, the browser attempts to find a matching pendingNavigationRequest. Since it's a renderer-initiated same-document navigation, theNavigationRequestisnullptr. InRenderFrameHostImpl::DidCommitNavigationInternal, the check meant to detect origin spoofing is bypassed becausenavigation_requestis null:C++ // content/browser/renderer_host/render_frame_host_impl.cc if (navigation_request && navigation_request->commit_params().navigation_token != params->navigation_token) { // ... crash logic ... } -
Premature Exemption Grant: Further down in
DidCommitNavigationInternal, the browser grants a process-wide origin exemption based entirely on the unvalidated, attacker-controlledparams->origin:C++ if (GetOrCreateWebPreferences().allow_universal_access_from_file_urls && params->origin.scheme() == url::kFileScheme) { ChildProcessSecurityPolicyImpl::GetInstance() ->GrantOriginCheckExemptionForWebView(GetProcess()->GetDeprecatedID(), params->origin); } -
Validation Bypass: The function then calls
ValidateDidCommitParams, which delegates toValidateURLAndOrigin. This function contains an early return that explicitly trustsfile://schemes if universal access is enabled:C++ if (origin.scheme() == url::kFileScheme) { auto prefs = GetOrCreateWebPreferences(); if (prefs.allow_universal_access_from_file_urls) { return true; } }This early return bypasses
CanCommitOriginAndUrl, skipping the strict consistency checks between the URL and the origin. -
State Update: Finally, because
features::IsEnforceSameDocumentOriginInvariantsEnabled()is disabled by default, the browser updates its canonical state (last_committed_origin_) to the attacker's spoofedfile://origin.
Potential Exploitation Steps
(Note: These are suggested steps; our tooling agent cannot execute a live proof of concept.)
- An attacker gains arbitrary code execution within a sandboxed renderer process in an Android WebView application that has
allow_universal_access_from_file_urlsenabled. - The compromised renderer crafts a
mojom::FrameHost::DidCommitSameDocumentNavigationIPC. - In the payload, the attacker sets
params->originto a target file origin (e.g.,file:///data/data/com.target.app/databases/secret.db). - The browser receives the IPC. Because it's a same-document navigation, the
NavigationRequestis null, bypassing the token mismatch check. - The browser executes the universal access logic, sees the
file://scheme, and grants the renderer a permanent process-wide exemption for that origin inChildProcessSecurityPolicyImpl. - The browser updates
last_committed_origin_to the spoofedfile://origin. - The renderer can now instantiate a
FileURLLoader(e.g., via afetch()call). Because it holds an exemption and the browser's state matches the requested origin, security checks pass, allowing the attacker to read local files and escape the sandbox.
Proposed Fix
Do not grant the ChildProcessSecurityPolicyImpl origin check exemption based on unvalidated IPC parameters. The exemption logic in DidCommitNavigationInternal should be deferred until after ValidateDidCommitParams has run, or it should rely on browser-side state rather than renderer-provided claims. Alternatively, the early return in ValidateURLAndOrigin should be restructured to ensure that consistency checks (like params->url matching params->origin) are not completely bypassed even when universal access is enabled.
Evaluated with Chrome root at commit: e9e0fcbb690b1a8c1a26c81c2a9ea23d6e178368
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 browser grants a process-wide origin exemption based on unvalidated renderer-supplied parameters before validating them, and an early return in validation skips consistency checks for file:// origins when universal access is enabled.
Impact
A compromised renderer could read arbitrary local files and escape the sandbox, but only when allow_universal_access_from_file_urls is enabled (common in Android WebView).
What the attacker needed
Compromised renderer process; allow_universal_access_from_file_urls enabled; Android WebView environment
The fix
The exemption should be granted only after validation, or validation should not skip consistency checks for file:// origins even when universal access is enabled.
How it was found
- An attacker gains code execution in a sandboxed renderer in an Android WebView app with allow_universal_access_from_file_urls enabled.
- The compromised renderer crafts a DidCommitSameDocumentNavigation IPC message.
- The attacker sets the origin parameter to a target file:// origin.
- The browser processes the IPC; because it is a same-document navigation, the navigation request is null and the token mismatch check is bypassed.
- The browser grants a permanent process-wide exemption for the spoofed file:// origin.
- The browser updates its canonical origin to the spoofed file:// origin, allowing the renderer to read local files via fetch().
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 web page runs inside a restricted 'sandbox' so it cannot read your files. This report shows that if a malicious page manages to break out of that sandbox, it can trick the browser into thinking it is allowed to read local files. The trick works because the browser trusts information sent by the page without checking it properly.
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.