In one line: when a browser extension embeds its own UI (an iframe) inside a web page, the assumption that "only my content script can drive this UI" does not hold. The Universal XSS in uBlock Origin (Firefox MV2 build; GHSA-cmqw-9r2w-6wv2, published 2026-11-15) came from four stacked assumptions: the extension's internal UUID could leak, web_accessible_resources made the UI embeddable by anyone, the receiving side never checked who was sending postMessage, and the extension relied on built-ins the page could override. This piece uses the incident to work out how to design the trust boundary for privileged UI placed inside a page.

Why this, why now

The problem

An extension has a privileged side (the background, pages on the extension origin) and a page side (content scripts, and scripts injected into the page's MAIN world). When you want UI on top of a page, the typical implementation looks like this:

  1. A content script inserts an iframe into the page DOM with src moz-extension://<UUID>/…/picker.html (or chrome-extension://<ID>/… on Chrome).
  2. The page can only load that HTML if it is listed in web_accessible_resources (WAR), so you list it.
  3. The content script and the iframe talk over window.postMessage and a MessageChannel.
  4. Because the page inside the iframe runs on the extension origin, it can ask the background to do privileged things, such as "add this filter".

The implicit assumption is that only your own content script knows the iframe URL and talks to the iframe. In practice:

So the "extension UI" had the strong authority of the extension origin while accepting input from anyone.

How it works

1. web_accessible_resources and URL secrecy

Per MDN, Firefox serves extension resources at moz-extension://<extension-UUID>/path. This UUID is not the extension ID. It is randomly generated per browser instance, so sites cannot fingerprint which extensions you have installed. In Chrome MV2 the extension ID is fixed, so chrome-extension://<ID>/path is public knowledge. In MV3 you can write WAR like this: matches limits which origins can access the resources, and use_dynamic_url: true allows access only through a dynamic ID that changes every session.