UXSS-class PBrowserBridge javascript: LoadURL principal forgery exfiltrates OOP cross-origin frame data
A compromised content process could send a forged IPC message to load a javascript: URL with a system principal into a cross-origin iframe, bypassing the normal cross-process javascript: rejection. This allowed attacker-controlled JavaScript to run in the victim frame while it retained the victim URL and principal, enabling data exfiltration.
Originally disclosed on Mozilla
- Fixed in 30 days
- Paid in 5 months
- Disclosed after 30 days
Created attachment 9591831
submit-poc-minimal.patch
A compromised embedder content process can send `PBrowserBridge::LoadURL` with a child-created `nsDocShellLoadState` whose URI is `javascript:` and whose triggering principal is `SystemPrincipal`.
`BrowserBridgeParent::RecvLoadURL` forwards that load state to the target `PBrowser` without validating the child-supplied principal or applying the cross-process `javascript:` rejection used by the normal `BrowsingContext::LoadURI` path.
The attached PoC patch adds a test-only raw IPC hook and a browser test. The test creates an out-of-process `https://example.org` iframe under `https://example.com`, sends the forged `PBrowserBridge::LoadURL`, and observes attacker-controlled JavaScript running in the victim cross-origin frame while the frame remains at the victim URL and retains the victim principal.
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
What the attacker needed
Compromised embedder content process
How it was found
- Create an out-of-process cross-origin iframe under a different origin.
- Send a forged PBrowserBridge::LoadURL message with a javascript: URI and a system principal.
- Observe attacker-controlled JavaScript running in the victim frame while it retains the victim URL and principal.
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.
Web browsers separate different websites into isolated processes for safety. This report shows that a malicious or compromised process could trick the browser into running JavaScript inside another website's frame, as if it were trusted system code. That would let an attacker read or steal data from that other site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.