Compromised content process can place ordinary HTTPS content in a file process via RemoteTypeOverride
A compromised web content process could set a child-supplied RemoteTypeOverride on a top-level about:blank load, causing later same-site HTTPS content to be placed in a file content process. This placement alone does not give file access, but the file-process sandbox on macOS grants broader file-read permissions than the ordinary web sandbox.
Originally disclosed on Mozilla
- Fixed in 9 days
- Paid in 37 days
- Disclosed after 9 days
Created attachment 9607045 firefox-remotetypeoverride-poc.tar
Summary
A compromised ordinary web content process can alter a child-originated top-level about:blank document load so that it carries both:
- a NullPrincipal whose precursor matches a chosen HTTPS site; and
RemoteTypeOverride = file.
The parent checks that the request is a top-level document load for about:blank, but does not establish trusted provenance for the override or prevent the child from selecting the file process class.
The resulting about:blank document commits in a file process without leaving its BrowsingContextGroup. During a later ordinary HTTPS navigation in another top-level in that group, process selection compares the destination site against existing WindowGlobal principals. It unwraps the seeded NullPrincipal precursor, finds a same-site match, and reuses the seed WindowGlobal's file remote type. The group then supplies the same file-process host.
A directed browser test confirmed that the final HTTPS document retained its normal HTTPS ContentPrincipal, committed in the same file-process PID as the seeded about:blank, and executed JavaScript from the HTTPS response body. A same-group negative control with a precursor for a different site did not select file and did not reuse the seed process.
Threat model
The attacker already has native code execution in an ordinary web content process and can alter the document-channel IPC sent by that process.
The attached C++ hook is test instrumentation that models this sender immediately before IPC serialization. This is not claimed to be reachable by ordinary web JavaScript alone, and it is not a memory-corruption report.
Root cause
DocumentLoadListener::Openaccepts a nonemptyRemoteTypeOverridewhen the request is a document load for exactabout:blankin a top-level BrowsingContext. It stores the child-provided value without authenticating its provenance or rejectingfile.IsolationOptionsForNavigationverifies that the channel result is a NullPrincipal, then copies the override directly intoNavigationIsolationOptions::mRemoteType. The override path does not require replacement of the BrowsingContextGroup.- NullPrincipal IPC reconstruction preserves the precursor encoded in the principal. Later process selection uses that precursor as the site key.
- For a normal navigation that remains in the group,
IsolationOptionsForNavigationscans WindowGlobals across the BrowsingContextGroup. When the destination is same-site with the seeded precursor, it returns the seed WindowGlobal's nonemptyfileremote type. CanonicalBrowsingContext::ChangeRemotenessrequests that remote type with the unchanged group.ContentParent::GetNewOrUsedLaunchingBrowserProcessfinds the group's existingfilehost, producing same-process reuse.- When the HTTPS WindowGlobal is created,
BrowserParent::RecvNewWindowGlobalvalidates its principal throughContentParent::ValidatePrincipal.ValidatePrincipalCouldPotentiallyBeLoadedByreturns true for remote types without an=origin suffix, includingfile, so it does not reject the ordinary HTTPS principal.
Relevant files:
netwerk/ipc/DocumentLoadListener.cppdom/ipc/ProcessIsolation.cppdocshell/base/CanonicalBrowsingContext.cppdom/ipc/ContentParent.cppdom/ipc/BrowserParent.cppipc/glue/BackgroundUtils.cpp
Reproduction
Tested on mozilla-central revision:
b5f92c07c92ce1a6870d2905c7594487e53dfeac
Environment: Firefox 154.0a1, macOS arm64, ASan, Fission enabled.
The attached firefox-remotetypeoverride-poc.tar contains exactly two files:
temporary-source-hook-and-manifest.patch— an ASan-only compromised-sender simulation hook and browser-test registration.browser_remote_type_override_bcg_reuse.js— the matching-precursor test and mismatched-precursor negative control.
From the source checkout:
-
Check out the revision above and extract the attachment.
-
Apply
temporary-source-hook-and-manifest.patchwithgit apply. -
Copy
browser_remote_type_override_bcg_reuse.jstodom/ipc/tests/browser_remote_type_override_bcg_reuse.js. -
Build with an ASan configuration and Fission enabled.
-
Run:
./mach test --force dom/ipc/tests/browser_remote_type_override_bcg_reuse.js
The hook is compiled only under MOZ_ASAN and activates only for the unique top-level name used by the test. The navigations themselves are initiated by message handlers in the loaded HTTPS documents. The test waits for the committed non-initial WindowGlobal after the remoteness change.
Observed result:
- 19 checks passed with no unexpected result.
- Matching precursor: the normal HTTPS document retained its HTTPS principal, executed its response-body JavaScript, and used the same
fileremote type and process as the seededabout:blank. - Mismatched precursor: the HTTPS document did not use
fileand did not reuse the seed process. - No ASan diagnostic occurred.
Security impact and limitations
The directly demonstrated result is ordinary HTTPS content executing in a file content process. Placement alone does not expose privileged JavaScript APIs or provide a JavaScript-only local-file read.
The process boundary matters because the macOS file-content-process sandbox addend grants (allow file-read*), which the ordinary web-content sandbox does not grant. To turn the demonstrated placement into native file access, an attacker would still need a renderer or JIT exploit that can be triggered again after the HTTPS page is placed in the file process. The initial native compromise does not automatically transfer into that process.
I have not demonstrated a native exploit re-trigger, local-file access, parent-process code execution, file write, process launch, or bypass of OS discretionary permissions or TCC.
Expected behavior
An ordinary content process should not be able to select a specialized file remote type through a child-authored document load. The override should be derived or authenticated in the parent, and an ordinary HTTPS principal should not be accepted for a file process based on NullPrincipal precursor reuse.
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 parent accepted a child-provided RemoteTypeOverride for about:blank without authenticating its provenance or rejecting the file type, and later process selection reused that remote type via a NullPrincipal precursor match.
Impact
Ordinary HTTPS content could be placed in a file content process, which on macOS has broader file-read sandbox permissions, but the report does not demonstrate actual file access or a re-triggered native exploit.
What the attacker needed
Native code execution in a content process; ability to alter document-channel IPC; Fission enabled
The fix
The override should be derived or authenticated in the parent, and an ordinary HTTPS principal should not be accepted for a file process based on NullPrincipal precursor reuse.
How it was found
- Check out the stated revision and extract the attachment.
- Apply the instrumentation patch with git apply.
- Copy the browser test into the dom/ipc/tests directory.
- Build with ASan and Fission enabled.
- Run the browser test with mach test.
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.
Firefox runs web pages in separate sandboxed processes, and some process types have different permissions. A page that has already taken over its own process could ask for a special 'file' process type, and Firefox would later put an unrelated HTTPS page into that same process. The report shows the page ends up in the wrong process, but does not show it actually reading local files.
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.