Compromised content process can UpdateDocumentURI
The browser's parent process accepted a document URI sent by a content process without validating it, so a compromised content process could set an arbitrary URI. This let it spoof the address bar, make extension messages appear to come from a trusted site, mislabel active media streams, and fill saved logins belonging to another origin.
Originally disclosed on Mozilla
- Fixed in 20 months
- Paid in 16 months
- Disclosed after 20 months
Created attachment 9288698 poc.patch
WindowGlobalParent::RecvUpdateDocumentURI does not validate the new DocumentURI, so a compromised content process is able to set an arbitrary documentURI (https://searchfox.org/mozilla-central/rev/675d6b7b04c4a802493d29632ee45f6e036a5702/dom/ipc/WindowGlobalParent.cpp#370).
This is used in several places including but not limited to:
-
Address bar and related components, when the history is updated, e.g.,
history.pushState()orhistory.back(). -
Hub.fillInAddressforextensions/ConduitsParent(https://searchfox.org/mozilla-central/rev/675d6b7b04c4a802493d29632ee45f6e036a5702/toolkit/components/extensions/ConduitsParent.jsm#187)
This sets MessageSender.url for extension messages. Many extensions rely on MessageSender.url to verify whether the message came from a trusted source.
webrtcUI.getActiveStreams(https://searchfox.org/mozilla-central/rev/675d6b7b04c4a802493d29632ee45f6e036a5702/browser/modules/webrtcUI.jsm#180)
This is used in "Tabs sharing devices" menu (the permission prompt is not affected).
LoginAutoComplete::startSearch(https://searchfox.org/mozilla-central/rev/675d6b7b04c4a802493d29632ee45f6e036a5702/toolkit/components/passwordmgr/LoginAutoComplete.jsm#531) andLoginManagerChild::_filterForExactFormOriginLogins(https://searchfox.org/mozilla-central/rev/675d6b7b04c4a802493d29632ee45f6e036a5702/toolkit/components/passwordmgr/LoginManagerChild.jsm#2646)
It seems only fill via the context menu is possible, autofill seems not affected.
Threrefore, the compromised content process can spoof the address bar, extension message from trusted component, Tabs sharing devices" menu, and get logins for another origin.
REPRODUCTION CASE
- Apply the attached
poc.patch. - Create a new login for
https://example.cominabout:logins. - Install the attached extension.
- Visit the attached
poc.htmlover secure origin (an online version is available in https://chs17f87gytb304hg6vk.glitch.me/) - Press "Click" and check the address bar.
- Check the extension message sender.
- Press "getUserMedia(audio)" and check "Tabs sharing devices" menu.
- 5-7 should show example.com.
- Open context menu on the Username field and select the login added in 2. Check the password field is filled.
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
Likely the IPC handler that updates a window's document URI trusted the content process and never checked that the new URI was legitimate for that window.
Impact
A compromised content process could spoof the address bar, impersonate a trusted origin to extensions, mislabel shared tabs, and cause logins for another origin to be filled, though the media permission prompt itself was not affected.
What the attacker needed
Compromised content process; saved login for another origin; victim uses context menu to fill
How it was found
- Apply the proof-of-concept patch to the browser build.
- Create a saved login for a test site in the password manager.
- Install the supplied test extension.
- Open the proof-of-concept page over a secure origin.
- Press the button and observe the address bar, extension message sender and media-sharing menu.
- Open the context menu on the username field and pick the saved login to see the password filled.
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 web browser splits its work into a parent process that controls the interface and content processes that render pages. If a page's process is taken over, it should not be able to lie to the parent about which address the page is on. Here the parent trusted that claim, so the fake address leaked into the address bar, extension checks and saved-password filling.
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.