Insufficient validation of untrusted input in Site Isolation (CVE-2026-9903)
A vulnerability in the browser's origin validation for MHTML subframes allows a compromised renderer to spoof its origin by sending a fabricated same-document navigation IPC. This can lead to privilege escalation, enabling abuse of permissions or WebAuthn credentials tied to the spoofed origin.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 56 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 security team.
Overview: A vulnerability in RenderFrameHostImpl::CanCommitOriginAndUrl allows a compromised renderer hosting an MHTML subframe to spoof its origin. By sending a fabricated same-document navigation IPC, the renderer can bypass origin validation and arbitrarily overwrite the browser's last_committed_origin_. This can lead to privilege escalation, allowing the attacker to abuse permissions or WebAuthn credentials associated with the spoofed origin.
Affected files:
content/browser/renderer_host/render_frame_host_impl.cc
Estimated timestamp from git blame: 2024-06-13
Description
A potential Site Isolation bypass exists in the browser's origin validation logic for MHTML subframes. RenderFrameHostImpl::CanCommitOriginAndUrl contains an early-return short-circuit for MHTML subframes that unconditionally accepts the renderer-provided origin without validating it.
When combined with the fact that features::kEnforceSameDocumentOriginInvariants is currently disabled by default, a compromised renderer can exploit this short-circuit to forge a same-document navigation IPC containing an arbitrary cross-origin origin. The browser process will accept this IPC and update its authoritative last_committed_origin_ for the frame to the attacker's spoofed origin.
Technical Details
In content/browser/renderer_host/render_frame_host_impl.cc, the CanCommitOriginAndUrl function short-circuits validation for MHTML subframes:
if (IsMhtmlSubframe()) {
RenderFrameHostImpl* main_frame = GetMainFrame();
if (IsSameSiteInstance(main_frame)) {
return CanCommitStatus::CAN_COMMIT_ORIGIN_AND_URL;
}
// ...
}
This bypasses several critical security checks, including the ChildProcessSecurityPolicyImpl enforcement. Furthermore, the fallback check for same-document origin changes (which operates when kEnforceSameDocumentOriginInvariants is disabled) is positioned after this MHTML block, meaning the origin invariance check is completely skipped.
When a malicious same-document navigation IPC passes this validation, execution eventually reaches RenderFrameHostImpl::DidNavigate. Because kEnforceSameDocumentOriginInvariants is disabled, the browser unconditionally executes SetLastCommittedOrigin(params.origin) for same-document navigations.
Once last_committed_origin_ is corrupted, the attacker can silently abuse any browser-side APIs that rely on it, such as permission requests (camera/mic/location) or WebAuthn assertions for the victim origin.
Potential Attack Steps
Note: Our tooling agent cannot run code, so these are potential steps to trigger the vulnerability based on static analysis.
- The victim opens a local MHTML file, causing the browser to load a main frame and subframe in the same
SiteInstancewithis_mhtml_document_set to true. - The attacker gains code execution in the renderer process (e.g., via a memory corruption bug in an image or font decoder, as JS is disabled in MHTML by default).
- The compromised renderer constructs a malicious
FrameHost::DidCommitSameDocumentNavigationIPC targeted at the subframe. - The IPC parameters include a spoofed origin (e.g.,
https://victim.example) and a random, unrecognizednavigation_token. - The browser processes the IPC. The unknown token causes it to synthesize a
NavigationRequest, but validation relies onCanCommitOriginAndUrl. - The MHTML short-circuit in
CanCommitOriginAndUrlunconditionally accepts the spoofed origin. RenderFrameHostImpl::DidNavigatecallsSetLastCommittedOrigin(params.origin), successfully spoofing the browser process's state.
Suggested Fix
Move the fallback same-document origin check (which runs when kEnforceSameDocumentOriginInvariants is disabled) to occur before the IsMhtmlSubframe() early return in CanCommitOriginAndUrl. Alternatively, explicitly enforce that MHTML subframes must commit with opaque origins in RenderFrameHostImpl::ValidateDidCommitParams(), similar to how error pages are currently validated.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
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 function `CanCommitOriginAndUrl` has an early return for MHTML subframes that unconditionally accepts the renderer-provided origin without validation, and the fallback same-document origin check is placed after this block, so it is skipped.
Impact
Once last_committed_origin_ is corrupted, the attacker could silently abuse browser-side APIs that rely on it, such as permission requests or WebAuthn assertions for the victim origin.
What the attacker needed
Victim opens a local MHTML file; attacker gains code execution in renderer; kEnforceSameDocumentOriginInvariants disabled
The fix
The fallback same-document origin check should be moved before the IsMhtmlSubframe() early return, or MHTML subframes should be explicitly forced to commit with opaque origins.
How it was found
- The victim opens a local MHTML file, loading a main frame and subframe in the same SiteInstance with is_mhtml_document_ set to true.
- The attacker gains code execution in the renderer process (e.g., via a memory corruption bug in an image or font decoder, as JS is disabled in MHTML by default).
- The compromised renderer constructs a malicious FrameHost::DidCommitSameDocumentNavigation IPC targeted at the subframe.
- The IPC parameters include a spoofed origin and a random, unrecognized navigation_token.
- The browser processes the IPC; the unknown token causes it to synthesize a NavigationRequest, but validation relies on CanCommitOriginAndUrl.
- The MHTML short-circuit in CanCommitOriginAndUrl unconditionally accepts the spoofed origin, and DidNavigate calls SetLastCommittedOrigin(params.origin), spoofing the browser process's state.
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 browser uses a security check to ensure a web page cannot pretend to be a different website. This report found that for a special type of file called MHTML, that check is skipped, so if an attacker can already run code inside the browser's rendering process, they can make the browser believe a page belongs to any site they choose. That could let them use permissions or login features meant for the real site.
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.