Skip to content
Access control Disclosed report Advanced CVE-2024-0748

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.

Young Min Kim Follow

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:

  1. Address bar and related components, when the history is updated, e.g., history.pushState() or history.back().

  2. Hub.fillInAddress for extensions/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.

  1. 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).

  1. LoginAutoComplete::startSearch (https://searchfox.org/mozilla-central/rev/675d6b7b04c4a802493d29632ee45f6e036a5702/toolkit/components/passwordmgr/LoginAutoComplete.jsm#531) and LoginManagerChild::_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

  1. Apply the attached poc.patch.
  2. Create a new login for https://example.com in about:logins.
  3. Install the attached extension.
  4. Visit the attached poc.html over secure origin (an online version is available in https://chs17f87gytb304hg6vk.glitch.me/)
  5. Press "Click" and check the address bar.
  6. Check the extension message sender.
  7. Press "getUserMedia(audio)" and check "Tabs sharing devices" menu.
  8. 5-7 should show example.com.
  9. Open context menu on the Username field and select the login added in 2. Check the password field is filled.

The original report as published on Mozilla's Bugzilla, by Young Min Kim. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

  1. Apply the proof-of-concept patch to the browser build.
  2. Create a saved login for a test site in the password manager.
  3. Install the supplied test extension.
  4. Open the proof-of-concept page over a secure origin.
  5. Press the button and observe the address bar, extension message sender and media-sharing menu.
  6. 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.

More by Young Min Kim

View all

1 more disclosed report, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.