Closed Bug 2047875 Opened 5 months ago Closed 5 months ago

PWindowGlobal LoadURI accepts forged srcdoc inherited principals for UXSS

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 2035756

People

(Reporter: atsu120225, Unassigned)

Details

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

Attachments

(1 file)

Attached patch patch.patch — — Splinter Review

A compromised content process can call PWindowGlobal::LoadURI for a descendant out-of-process frame with an about:srcdoc nsDocShellLoadState containing attacker-controlled SrcdocData and a forged PrincipalToInherit for another web origin. WindowGlobalParent validates the target and blocks javascript: loads, but does not bind the load-state principals to the sending actor/process. docshell then creates the srcdoc document with the forged victim principal.

The patch adds a test-only raw send path and a browser test. The test first shows ordinary srcdoc inherits https://example.com and cannot read https://example.org cookies, localStorage, or response bodies. The raw PWindowGlobal::LoadURI load then runs attacker-controlled srcdoc as https://example.org, reads victim cookies/localStorage, reads a victim response body without a CORS error, writes a victim cookie/localStorage value, and postMessages from the victim origin.

Flags: sec-bounty?
Group: firefox-core-security → dom-core-security
Component: Security → DOM: Navigation
Product: Firefox → Core

vhilla, is this a dupe of bug 2035756? Thanks.

Flags: needinfo?(vhilla)

Yes, it's a dupe.

It's also very similar to bug 2043820 from the same reporter. I.e. the principal can be forged on nsDocShellLoadState and the bugs differ in what URL they load and which method they use to send the load state.

Status: UNCONFIRMED → RESOLVED
Closed: 5 months ago
Duplicate of bug: 2035756
Flags: needinfo?(vhilla)
Resolution: --- → DUPLICATE
Flags: sec-bounty? → sec-bounty-
Group: dom-core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: