A Malicious Web Page Hijacked uBlock Origin — and Wrote Trusted Filter Rules Through Its Own UI

browser securityuBlock OriginXSSbrowser extensions

Sources:iter.ca original post + GitHub advisory GHSA-cmqw-9r2w-6wv2 + Hacker News discussion

image\ngoogle.com##+js(trusted-rpnt, script, /^[\s\S]*$/, alert('injected on '+document.domain))

A filter rule carrying the trusted flag, written into the browser by uBlock Origin’s own element picker — and the hand doing the writing was the web page itself.

On 2026-11-15, security researcher Smitty van Bodegom (loops / syvb) disclosed a one-click universal XSS (UXSS) in the element picker, affecting the Firefox MV2 (Manifest V2) build up to and including 1.75.2, fixed in 1.75.4. uBO Lite, the MV3 variant, has a similar but less severe issue. The advisory is rated High. A malicious page can write arbitrary trusted filter rules without the user’s knowledge, and trusted rules can execute scripts — so the next time the user opens any target site, the injected code runs in that origin. The ad blocker audits every page; the interface of the auditing tool became, in turn, a script execution channel for the page.

A Four-Step Attack Chain: Guess the UUID, Hide an Iframe, Drive the Picker, Steal One Click

The element picker is uBO’s “select an element, generate a filter” interface, implemented as a moz-extension:// internal page. On Firefox, the only unknown in its URL is the extension’s internal UUID, randomly generated per install. The browser bets the entire confidentiality of extension internal pages on that single random value — once the UUID leaks, the boundary is gone.

Ironically, the leak path runs through uBO’s own blocking logic. A default uAssets rule, lootdest.*##+js(no-fetch-if, adsbygoogle, war:googlesyndication_adsbygoogle.js), hooks the page’s fetch and, inside the hook, sends an XHR to moz-extension://<UUID>/web_accessible_resources/googlesyndication_adsbygoogle.js — replacing the ad JS with a behaviorally correct dummy script that does nothing. An attacker hooks XMLHttpRequest.prototype.open, reads the full UUID out of that internal XHR, and the trigger is a single line: fetch('/adsbygoogle.js').catch(() => {}). The script that blocks ads wrote the extension’s own address onto the request. The author notes this is not the only leak path.

With the address in hand, the rest is routine: create an iframe with opacity: 0 and embed the picker into the page; open a MessageChannel via postMessage({ what: 'epickerStart' }, '*', [ch.port2]) and feed in the desired rule step by step through the start → showDialog → dialogSetFilter → resultsetDetails sequence; finally, slide the invisible iframe under the mouse cursor and trick the user into clicking the invisible “Create” button. All four steps use standard APIs the browser exposes to web pages, and to the user it looks like one perfectly ordinary click. The author’s live PoC is Firefox-only and runs exactly this chain.

The byproducts deserve their own ledger: since any site can fetch the UUID via fetch('/adsbygoogle.js'), it becomes a stable anchor for cross-site fingerprint tracking. The author notes in the write-up: “There are a few ways the UUID can leak; not just this one rule.” Chromium only recently started requiring web accessible resources to use dynamic IDs, and even now it’s optional — browserleaks lists a batch of extensions still serving fixed URLs. The same random identifier is an attack path during a UXSS and a tracker the rest of the time.

A Single Newline Punches Through Filter Validation

The injection lands on the opt field. Its intended purpose is to hold network request types: fill in image, and it gets appended to the filter with a $, producing a modifier like $image. The validation logic trusts the field’s contents as an enum value — but the field itself is in the attacker’s hands.

The attacker stuffs in a newline, so opt becomes image\ngoogle.com##+js(trusted-rpnt, script, /^[\s\S]*$/, alert('injected on '+document.domain)). After concatenation, one network filter becomes two: the first half is something validation can read, the second half is a cosmetic filter with a +js() directive that executes script on matching pages. The author adds just one line: “This is exactly a network filter.” Validation sees the legal half; what runs is the other half.

One layer down sits the trust model: filters added through the element picker are always marked as trusted, at least until the next recompilation — the trust flag clears when the user edits their custom filters, triggering a rebuild. An attacker can open the victim page immediately, so the buffer period is meaningless — the flag’s lifetime is bounded by “the user’s next deliberate edit,” and the attack only needs to beat that.

14 Days, Four Commits, Three Paths Closed

The disclosure process was clean. On 2026-11-01, the researcher reported by email. On 11-02, commit bf69cf7 swapped out the pollutable XHR method in the scriptlet and shipped with 1.75.2. In the same day’s email exchange, the researcher pointed out that a responseText getter defined on the XHR prototype would still yield the UUID; maintainer Raymond Hill replied “Clever, thanks for reporting,” held back the details, and planned to add commit messages after the stable release.

The next two commits changed the approach: on 11-03, 9859477 made the element picker accept only a verified secret token, shipping in 1.75.4; on 11-08, b1f7d27 added validation of the filter about to be created and 150df12 temporarily disabled war: filters, shipping in 1.76.0. The advisory went public on 11-15 — 14 days after the initial report. One commit each for the leak source, entry-point authentication, and input validation, and 14 days from report to disclosure. That’s fast by extension-ecosystem standards. The community suggested simply deleting the old profile and starting fresh — a new profile generates a new UUID.

One more detail: the author writes that “GPT-5.6 Sol did most of the hard work of finding the issue” — he set the direction first (filter rule injection might yield some form of UXSS), the model found the concrete bug, and he verified each step; most of the PoC code came from Claude, and he wrote the article himself. Human sets direction, model searches, human verifies — that pipeline is becoming standard equipment in security research.

The UI Lives in the Same DOM as the Page It Audits

Zoom out, and none of the four attack steps touches a process boundary or a privilege escalation: what the attacker manipulates, throughout, is an interface uBO itself placed into the web page. The element picker has to draw a UI for users to select elements, and that kind of interface can only be injected as an iframe into the audited page. The auditing tool’s UI and the thing it audits share one DOM, and the web page side naturally holds the primitives to operate it: postMessage can drive it, mouse events can click it.

uBlock Origin's element picker interface Image: The element picker in its normal form — an overlay embedded in the page. In the attack chain, it’s this exact overlay that a hidden iframe loads and postMessage drives step by step. Source: iter.ca (author’s screenshot)

The cost of a shared DOM has ready-made precedent: in January of this year, 1Password injected prism.js globally into every page, breaking large numbers of <code> blocks, and the problem persisted for at least 20 days. When extensions and pages share a DOM, one mistake breaks everything at scale. AdNauseam, a fork of uBO, was hit the same way; the community compared its 0e757ee3 against uBO’s bf69cf7 and confirmed the identical issue, since fixed in a new release.

Overpowered Extensions, or a Platform That Never Provided the UI?

The discussion produced two lines of attribution. One focuses on the permission model: an extension can write rules like trusted-rpnt that execute script in any domain, and rules generated by the element picker are automatically flagged as trusted — the permissions are simply too broad. Following that logic, tightening the conditions under which trusted rules are granted, and defaulting rules produced by web-triggerable interfaces to untrusted, would cut the blast radius.

The other line focuses on the platform. Firefox former core developer esprehn said in the Hacker News discussion that he still regrets not pushing harder back then for the extensions overlay API — an API designed around the Top Layer whose primitive version never landed in the platform, with no later mechanism that could actually give extensions their own subtree. DevTools has a standalone Overlay Page, date pickers on some platforms use overlay pages too — but that mechanism was never opened up to extensions. If the picker UI lived in a platform-managed top layer, neither the page’s postMessage nor its mouse events could reach it, and step one of the four-step chain never gets built.

Both attributions carry weight, and both carry costs: tightening permissions runs into the blocker’s core capability — uBO fundamentally has to rewrite page scripts to block ads; shipping the overlay API means paying off a platform-side primitive debt years overdue, championed by people who have long since moved on. Someone in the discussion also pushed back: browsers ship several RCE-grade CVEs in a single month, so why should one XSS in an extension be treated as a powder keg? That point cuts against the intuition that “extension permissions are inherently dangerous” — severity depends on the permission boundary and the speed of the fix, and this time the extension ecosystem closed every known path in 14 days, faster than plenty of platform-level vulnerabilities.

The Holes Are Patched; the Top-Level UI Is Still Outstanding

Raymond Hill has closed all three known paths, and AdNauseam followed with its own fix. This incident can be marked closed. The thing esprehn regrets has still not materialized: extensions still have no top-level UI independent of the web page, and the element picker still has no choice but to live inside the page it audits.

As long as the architectural premise doesn’t change, neither does the terrain — the next person who hides an iframe at opacity: 0 and finishes with a single click will face the same open field. Permission boundaries determine the blast radius; top-level UI determines whether the path exists at all. uBO has patched its holes this time. The layer of UI the platform owes is still missing.

References:

  • loops (Smitty van Bodegom): the original uBlock Origin element picker UXSS disclosure
  • GitHub Advisory GHSA-cmqw-9r2w-6wv2
  • The author’s live PoC demo page
  • The related Hacker News discussion