Remix.run Logo
▲ ByteOfWood 2 hours ago

I never really loved how extensions have to put their interfaces in the website's DOM if they want to be able to work with the page's elements, like this selector, or a password manager's suggested logins. Especially in the password manager's scenario, it could leak what accounts you have to a given website to that website itself, if the page is looking for new DOM elements. Not exactly a showstopper vulnerability, but it's not a good thing.

▲btown an hour ago | parent | next [-]

Setting aside data leaks, this also causes bugs in extensions to potentially affect websites en masse. For instance, as recently as this January, 1Password began injecting prism.js globally on all pages, breaking many <code> blocks for at least 20 days: https://mjtsai.com/blog/2026/01/07/1password-browser-extensi...

▲wtallis 2 hours ago | parent | prev | next [-]

Did XUL extensions in Firefox prior to WebExtensions have a different way of interacting with the page contents? I know they tended to integrate better with the host browser's UI and inherited more of the host OS's UI conventions as a result, but the web back then didn't require as many CSS-based ad blocking rules (domain/URL-based rules worked for almost everything) so I don't remember what the element picker UI was like on eg. AdBlock Plus or Adblock 0.5.

▲forgotmypw17 2 hours ago | parent [-]

XUL extensions basically have full access to the entire browser's UI and internals, which allows for some very powerful extensions.

If this sounds appealing to you, you may be happy to know that XUL lives on as Unified XUL Platform (UXP) and is still supported by currently maintained browsers.

UXP: https://repo.palemoon.org/MoonchildProductions/UXP

Pale Moon: https://www.palemoon.org/

Basilisk: https://www.basilisk-browser.org/faq.html

SeaMonkey: https://www.seamonkey-project.org/

▲wtallis an hour ago | parent [-]

That doesn't really answer the question. Sure, XUL extensions have better access to the internals of the browser. But does that translate into XUL extensions being able to better isolate their own internals from being accessed by untrusted websites?

▲forgotmypw17 34 minutes ago | parent [-]

Yes, with caveats. They could have UI that the websites couldn't access, but the fact that they interacted with website content could still expose them to attacks.

▲kqp 34 minutes ago | parent | prev | next [-]

This leak doesn’t exist. The injection goes in a sandboxed iframe, which is protected from the rest of the page by the same security boundary that prevents them from puppeteering your bank’s pages in an iframe they’ve embedded themselves.

▲Banou an hour ago | parent | prev [-]

In the case of password managers, amy decent one will put their DOM elements in a closed shadowDOM root, which prevents the page scripts from interacting with it entirely.

▲forgotmypw17 an hour ago | parent [-]

Shadow DOM is not a security boundary, and can be bypassed.

▲moi2388 35 minutes ago | parent [-]

From a page, which loads after the extension? How?

▲forgotmypw17 28 minutes ago | parent [-]

>The {mode: "open"} argument gives the page a way to break the encapsulation of your shadow DOM. If you don't want to give the page this ability, pass {mode: "closed"} instead, and then shadowRoot returns null.

>However, you should not consider this a strong security mechanism, because there are ways it can be evaded, for example by browser extensions running in the page. It's more of an indication that the page should not access the internals of your shadow DOM tree.

https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...

This presentation talks about using window.find() and other methods:

https://speakerdeck.com/masatokinugawa/shadow-dom-and-securi...