uBlock Origin Fixes Element Picker Flaw That Allowed Script Injection

uBlock Origin has fixed an element picker flaw that could let a malicious site prepare a trusted filter and run JavaScript on another site. Check that your extension is up to date.

· 5 min read · 5 comments

uBlock Origin has fixed a flaw that could let a malicious site use the element picker to add a trusted filter rule and run JavaScript on another site. The author of the research says he discovered the issue earlier in November 2026. The main attack scenario involved uBlock Origin for Firefox on MV2; a similar but less serious issue affected uBO Lite on MV3. Users should check that their extension is up to date.

How a Site Gained Access to the Element Picker

The element picker lets users create a rule to block part of a page without leaving it. Its interface opens in an extension frame and can send a command to add a filter. In the attack described, a malicious site tried to control that interface instead of the user.

First, the page needed to learn the extension’s internal URL. In Firefox, that URL contains a random identifier that varies between installations. The researcher demonstrated one way to obtain it: a rule from uBlock Origin’s default filter lists redirected an ad script request to an extension resource. A malicious page could intercept that request and extract the identifier. According to the author, there may be other ways to learn the URL.

The site could then embed its own frame containing the element picker interface and send it messages to set up a filter and prepare the button that would create it. The central flaw was that the picker accepted these messages from a page that should not have been able to control it.

The picker’s normal restrictions would not allow someone to enter a script-injecting rule directly. But the network request type field was appended to the filter text. By inserting a newline into that field, an attacker could start a new entry: a trusted rule for a chosen domain capable of injecting a script. Data intended to qualify one rule became a separate command.

Why a Click Was Needed and What Was Fixed

Creating the filter still required a click on the button. The author suggests that a site could make the frame invisible or position it so the user clicked the button without noticing the picker. The researcher did not implement this step in the proof-of-concept code. The deceptive click is therefore part of a possible attack scenario, not a user action he demonstrated.

Filters added through the picker were treated as trusted at least until the filter list was rebuilt. That trusted status gave the planted filter the ability to run JavaScript on another site. Rebuilding the list could remove that status, but, as the author notes, an attacker could immediately open the page the rule was prepared for.

Simply visiting a malicious site would not execute code: the chain described requires the picker’s URL, a prepared filter, and a click on the button to create it. The issue has been fixed. Among the safeguards the author describes is a secret that the genuine picker receives from the extension’s script on the page and passes along in its initial message. The article does not specify which version contains the fix.

What This Means for Website Teams

The vulnerability was in the user’s extension, not in the code of the site where the injected script might later run. Checking your own site therefore will not tell you whether a visitor has a patched version of uBlock Origin installed.

The practical step for a team is to check that the extension is updated in the browsers they use for work and testing, especially Firefox with uBlock Origin on MV2. The author also mentions uBO Lite on MV3 but does not equate its issue with the main attack scenario. The full details of that attack cannot be assumed to apply to uBO Lite.

For extension developers, the lesson is about the trust boundary: an interface embedded in a page should not treat instructions from that page as user actions. The risk arose from the combination of messages that could control the picker and the trusted status of the filter it created. Checking the contents of a field or whether a button was clicked does not, on its own, explain the whole chain.

I often remind teams that an analytics event alone does not prove someone understood the outcome of an action. Here, a button click looked like a user decision to the extension, even though the site could have prepared the rule in advance and hidden the context. When reviewing an interface like this, I would ask not just whether the button was clicked, but who prepared the action and whether the person could see its consequences.

In my view, fixing the known attack chain and looking for related scenarios should be assessed separately. This flaw has a documented attack path and a safeguard, but the author points out that there are different ways to learn the extension’s internal URL. Verifying that the identified path is closed is a clear task; investigating the other possibilities is a separate piece of work.

Sources

Where the news comes from. The text is a retelling in the author’s own words; the facts come from the source, the opinion is the author’s.

  1. Universal XSS in uBlock Origin from website-driven element picker iter.ca

About the author

Daniel Zelenka

Web analyst and instructor

I set up website analytics and teach hands-on classes in Brno. I often remind teams that a tracked event doesn’t necessarily mean the user actually got any value.

All posts by the author

Leave a comment

Not published. We’ll send a link to confirm your comment.

No links or ads. Your first comment is published after review. By sending a comment you agree to the privacy notice.

  1. One useful follow-up for extension teams is to test the picker as a cross-origin boundary, not just as a UI flow: can a page discover or message the extension frame, and are commands tied to a user-initiated picker session? That kind of threat-model check can catch issues that ordinary interface testing misses.

  2. On a product team, I’ve seen people treat an extension’s “pick an element” tool as harmless because it looks like a UI affordance, not a privileged action. That’s exactly the kind of assumption a tidy prototype won’t catch; we now test these flows with untrusted page content and make the confirmation state explicit. A click is evidence of interaction, not proof the user understood what the page was asking the extension to do.

    1. How do you make the confirmation state explicit without turning every element-picker action into a warning users will click through automatically?

      1. @uutti.maki I’d reserve confirmation for actions that cross a trust boundary, rather than show it for every pick. For example, picking an element can stay one-click, but adding a trusted filter should show the exact rule and the site it will apply to, with a clear confirm action; that gives users something concrete to judge instead of another generic warning.

        1. A click can pick an element; apparently it shouldn’t get promoted to filter administrator. Showing the exact rule before it earns “trusted” status seems like a sensible speed bump, not another pop-up to click away.