uBlock Origin on Firefox had a one-click universal XSS via its element picker, now fixed

uBlock Origin on Firefox had a one-click universal XSS via its element picker, now fixed

The author of an iter.ca post reports finding, earlier this month, a one-click universal XSS issue in uBlock Origin. It affects the MV2 Firefox version; a similar but less problematic issue also affected the MV3 version, uBO Lite. According to the post, a malicious website could trick the extension into adding arbitrary trusted filters. Trusted filters can inject JavaScript into pages, so the website could create a trusted filter on another site and run arbitrary JS in the context of any site. The author says the issue is fixed now and points readers to a GitHub advisory for more details.

The author credits an AI model with the discovery. He says GPT-5.6 Sol did most of the hard work of finding the issue: he figured there might be some kind of universal XSS from filter injection, asked the model to take a look, and it found the issue. He then checked and verified what it proposed. He wrote all of the prose himself, and Claude wrote most of the code for the proof of concept.

The post explains the background. uBlock Origin has an element picker, opened by right-clicking the page, which lets a user create a filter to block an element without leaving the page. The picker is implemented as an iframe that the extension injects, and that page can talk to the extension's background script and tell it to add filters. The core flaw, in the author's words, is that the element picker should not accept messages from the attacker. A page the attacker controls could embed the picker in an invisible (opacity 0) iframe and drive it. Normally the picker restricts which filters a user can enter and does not allow scriptlet filters, but the post describes a way around that restriction through one of the fields the picker accepts, which let an arbitrary trusted filter containing a script through.

The attack needs a user click. The author says a malicious site could overlay content on top of the embedded picker or make it invisible, so as long as the site can get the user to click on the page, it can add arbitrary trusted filters for arbitrary domains. He notes he did not actually implement that click-capture step.

Two details explain why the impact is wide. First, filters added by the element picker are always treated as trusted, at least until a recompile. Second, on Firefox the attacker only needed one piece of information, the extension's internal UUID, which is random per installation. The author says there are several ways that UUID could be leaked, and the one he used in the post is only one of them.

The author notes that a later change to the user's custom filters would cause a recompile and clear the filter trust, but says this does not help much, because the attacker could just open the victim page immediately. One of the fixes he describes is a secret password: the real element picker gets it from the content script and sends it in the initial postMessage, so that the picker can tell its genuine counterpart from an attacker's page.

Key facts

  • The post reports a one-click universal XSS in the MV2 Firefox version of uBlock Origin; a similar but less problematic issue also affected the MV3 version, uBO Lite.
  • A malicious website could drive the element picker, in an invisible (opacity 0) iframe, to add arbitrary trusted filters, which can inject JavaScript into any site.
  • The author says GPT-5.6 Sol did most of the hard work of finding the issue; he verified it himself, and Claude wrote most of the proof-of-concept code.
  • One fix is a secret password that the real element picker gets from the content script and sends in the initial postMessage.
  • The issue is fixed, and the author points to a GitHub advisory for details.

Why it matters

uBlock Origin is a content blocker that runs inside the browser, and its trusted filters can inject JavaScript into pages. The post shows how a hidden extension page that accepted messages from any web page could turn that capability into arbitrary JS in the context of any site. The post is also notable for how the bug was found: the author says GPT-5.6 Sol did most of the hard work of finding it, with a human directing the search and verifying the result.

Who it affects

According to the post, the universal XSS affected the MV2 Firefox version of uBlock Origin. A similar but less problematic issue also affected the MV3 version, uBO Lite. The post does not detail what the uBO Lite issue was beyond calling it similar but less problematic.

How to use it

The post says the issue is fixed and points to a GitHub advisory for details. The fixed version number of uBlock Origin or uBO Lite is not stated in the post, so check the advisory for which release contains the fix. For other extension authors, the post's lesson is concrete: an extension page that web pages can embed should not accept messages from them. The described fix is a secret password that the genuine picker obtains from the content script and sends in its first postMessage.

How solid is it

The account comes from the discoverer's own write-up, and the author says he checked and verified the issue the AI model proposed. The post refers to a GitHub advisory and a proof of concept. No CVE identifier, severity score or advisory number is given in the post. No evidence of exploitation in the wild is mentioned.

Risks and caveats

The author says he did not actually implement the click-capture step, so the full one-click chain is described rather than demonstrated end to end. The attack depends on the user clicking on a page the attacker controls. He also says the extension's internal UUID, random per installation, could be leaked in several ways, so hiding it is not a defence. Clearing trust by editing custom filters does not help much, in his view, because the attacker could open the victim page immediately. No exact date of discovery, report or fix is given beyond 'earlier this month'.

“the element picker shouldn’t accept messages from the attacker.”

— Author of the iter.ca post