Closed Bug 2073977 Opened 2 months ago Closed 2 months ago

RecvReloadWithHttpsOnlyException (WindowGlobalParent) doesn't verify the sender is the top error page (checked only content-side); a compromised subframe process forces the cross-origin top to http + whitelists it = HTTPS-only bypass.

Categories

(Core :: DOM: Security, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 2014104

People

(Reporter: adawn0106, Unassigned)

Details

(Keywords: reporter-external, Whiteboard: [client-bounty-form])

Attachments

(1 file)

Attached file SOURCE (1).txt —

Summary

WindowGlobalParent::RecvReloadWithHttpsOnlyException() (dom/ipc/WindowGlobalParent.cpp:1759) performs a privileged action — it adds a session https-only-load-insecure (LOAD_INSECURE_ALLOW_SESSION) permission for BrowsingContext()->Top()'s origin and then navigates the top browsing context to the http version of its current URL with the system triggering principal — with no verification that this is the top-level window or the trusted error-page document. It uses Top() unconditionally regardless of which window's actor sent the message.

The only legitimate sender is the HTTPS-only error page's "Continue to HTTP Site" button: errorpage.js:120 → Document::ReloadWithHttpsOnlyException() (Document.cpp:1732) → wgc->SendReloadWithHttpsOnlyException(). Web JS is prevented from calling it by a content-process-only WebIDL gate [Func="Document::CallerIsTrustedAboutHttpsOnlyError"] (Document.webidl:344), which requires the caller be about:httpsonlyerror (Document.cpp:1693, IsAboutErrorPage(win,"httpsonlyerror")).

That [Func] trust check lives entirely in the content process's JS binding layer. A compromised content process bypasses it by sending SendReloadWithHttpsOnlyException() directly on any WindowGlobalChild it hosts — including a cross-origin subframe's. The parent handler never re-verifies it. Result: a compromised subframe process forces the victim top tab (cross-origin to it) to (a) be session-whitelisted for insecure loading and (b) reload over http — an HTTPS-only-mode bypass + forced insecure downgrade across the process/origin boundary.

Root cause — matched-pair (asymmetry within the same file)

  • Vulnerable: RecvReloadWithHttpsOnlyException acts on Top() with no IsTop()/error-page check (WindowGlobalParent.cpp:1759).
  • Matched gated siblings in the SAME file guard top-only actions: RecvUpdateDocumentTitle (:538) does if (!BrowsingContext()->IsTop()) return IPC_OK();; lines 253/548/1874/1889/1953 use IsTop()/IsTopContent(). And the cert sibling DoAddCertException (:1715) is self-scoped to this window's OWN GetFailedChannel() host+cert (cannot touch Top() or a foreign host). The https-only path is the outlier.
  • General principle: a security check enforced only in the sending process (here the WebIDL [Func=CallerIsTrustedAboutHttpsOnlyError]) must be re-enforced in the parent under the compromised-content-process model; this handler doesn't.

Reachability

WindowGlobalChild is a per-window actor; every frame (incl. a cross-origin subframe in its own Fission process) has one and can send its protocol's messages. Compromised subframe process → SendReloadWithHttpsOnlyException() → parent this = subframe WGP, BrowsingContext()->Top() = victim top. Identical "content process drives a parent handler for a context it does not own" reachability already live-proven in FF-047/FF-052 (same-BrowsingContextGroup).

Estimated severity

CVSS 4.7 Moderate — CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N. AV:L = compromised content process. AC:H reflects the dependency on HTTPS-only mode being enabled (dom.security.https_only_mode, opt-in, not default) for the security-relevant bypass; when it IS enabled, a cross-origin subframe process silently strips the victim top tab's HTTPS-only protection for the session and forces an http downgrade (S:C, cross-origin). Without the pref, the impact reduces to a forced top navigation to the http version of the top's OWN URL (bounded — not an arbitrary URL). Honest Moderate.

What IS and IS NOT claimed

  • SOURCE-VERIFIED: read the handler (acts on Top(), no IsTop/error-page re-check), the content-only [Func] trust gate it fails to mirror, the single legitimate top-level sender, and matched IsTop()-guarded siblings in the same file. Reachability inherited from the live-proven FF-047/FF-052 class.
  • NOT live-reproduced: the observable (victim top URL/permission) is parent/victim-side and cross-origin-unreadable by the attacker subframe — the same live-observability limitation as FF-054..FF-067 (would require a dbg2 parent-side breakpoint showing Top() navigated to http with a non-top this).
  • Confidence: MEDIUM. Real matched-pair gap; residual triage risk = whether the servicing team treats the content-side [Func] gate as sufficient (it is not, under the compromised-content-process model). No memory corruption.
Flags: sec-bounty?
Group: firefox-core-security → dom-core-security
Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Component: Security → DOM: Security
Duplicate of bug: 2014104
Product: Firefox → Core
Resolution: --- → DUPLICATE
Group: dom-core-security
Flags: sec-bounty? → sec-bounty-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: