Flaw in uBlock Origin element picker opened browsers to universal code injection
A newly patched chain of weaknesses allowed hostile websites to manipulate an invisible interface and install trusted filters capable of running code across any domain.

How could an ad blocker compromise website boundaries?
Browser security depends on the same-origin policy, a fundamental rule that prevents code running on one domain from inspecting or modifying data belonging to another. Content blockers such as uBlock Origin hold privileged positions above that boundary, inspecting network traffic and modifying webpage elements to strip advertisements and tracking scripts across every site a person visits.12 When an extension possesses the authority to rewrite content everywhere, a structural flaw in its internal interface can bypass the browser's origin protections entirely. Such a failure produces universal cross-site scripting, an outcome in which an attacker executes arbitrary code within any open origin rather than just their own domain.
A vulnerability disclosed by an independent security researcher demonstrated that a malicious site could manipulate uBlock Origin into creating powerful filter rules without the user realising what had happened.2 By combining an internal address leak, an invisible embedded frame, message tampering, and a single page click, an attacker could force the extension to register a rule capable of injecting JavaScript into arbitrary destinations.2 The weakness resided in how the extension managed its interactive element picker, an interface designed to help users point at unwanted web components and remove them.12
How did the attack chain turn a filter into arbitrary script execution?
The path from visiting an untrusted page to executing unauthorised JavaScript on an unrelated site required several distinct steps to succeed in sequence. First, the hostile website had to discover the unique internal address that the browser assigned to the uBlock Origin installation. Second, using that address, the site had to embed the extension's element-picker interface inside a hidden sub-frame on the page. Third, the attacker had to transmit synthetic messages into that hidden frame to populate it with an illicit script-injecting rule. Fourth, the attacker had to induce the visitor to click on the page, striking an invisible confirmation button. Finally, the newly generated rule took effect, allowing the attacker to open target websites where the extension itself would execute the injected code.
The first barrier confronting an attacker in Mozilla Firefox was the randomized internal identifier assigned to extensions upon installation. In Firefox, extension resources are addressed using URLs that begin with moz-extension followed by a random universally unique identifier.2 This random identifier exists specifically to prevent ordinary websites from guessing extension paths or fingerprinting which add-ons a person has installed. However, certain default filter rules within uBlock Origin, sourced from the uAssets repository, were designed to replace remote ad scripts with inert local substitutes. One rule targeted Google Syndication scripts by intercepting network calls and loading a local replacement file from the extension's web-accessible resources via an internal request.2

Because the replacement file was fetched through an XMLHttpRequest initiated within the page context, the hosting website could intercept the call by replacing the browser's standard request methods.2 By defining a custom hook on the request object prototype, the malicious page could inspect the outgoing address, match the moz-extension prefix, and extract the complete unique identifier. According to the disclosure document, the author noted that several techniques existed to leak this identifier beyond that single default rule.2
How did synthetic messages bypass the element picker's validation?
Once the hostile site captured the internal identifier, it could load the extension's element picker interface directly into an iframe element pointing to the internal user interface file.2 Under normal operation, a user enters element-picker mode from the extension menu or context menu, selects an unwanted visual item on the page, reviews a dialog box, and clicks a Create button to save a cosmetic or network rule. The user interface inside the embedded frame communicates directly with the extension's privileged background script, which holds the authority to store new rules in the user's permanent filter list.2
The research revealed that the embedded interface accepted communication from external origins without verifying who was talking to it.2 Using a standard browser MessageChannel, the hostile script could transmit an initial start message followed by configuration directives directly into the frame window.2 Normally, the interactive element picker restricts what kinds of expressions a user can supply, disallowing the manual insertion of advanced scriptlet filters.21 Scriptlets are specialised JavaScript routines packaged within uBlock Origin to defuse anti-adblock mechanisms, modify page variables, or neutralise complex tracking scripts.
The attacker bypassed this restriction by exploiting the request options field within the interface message. This field normally designates the type of resource to match, such as an image, and gets appended to the filter string following a dollar sign.2 Because the interface failed to validate the field against unexpected characters, the attacker inserted a newline character into the parameter.2 The newline split the generated filter text into multiple lines, converting the secondary string into a new, independent rule instructing uBlock Origin to run a trusted scriptlet on an external target domain like google.com.
Rules generated through the element picker interface were automatically classified by the extension engine as trusted filters.2 Trusted filters possess elevated privileges within uBlock Origin, permitting them to execute scriptlet code directly inside page contexts.2 By driving the hidden dialog box to register the smuggled rule, the attacker gained the capability to execute arbitrary JavaScript within any chosen origin as soon as the victim navigated to that domain.

How did the developer eliminate the interface vulnerability?
Completing the attack required physical interaction because the element picker interface still demanded a click on its Create button to confirm rule generation. An attacker did not need to persuade the user to configure a filter deliberately. Instead, the attacking page could render the embedded iframe completely invisible by reducing its opacity to zero and positioning the confirmation button directly beneath the user's cursor.2 When the visitor clicked anywhere on the decoy page, the click passed into the invisible element picker, saving the malicious filter into the extension's active ruleset.
Following private disclosure on November 1, 2026, uBlock Origin developer Raymond Hill published a sequence of defensive updates across versions 1.75.2, 1.75.4, and 1.76.0.3 The initial mitigation in version 1.75.2 altered scriptlet mechanics to avoid invoking potentially tainted request methods that page scripts could hook to observe internal identifiers.3 Version 1.75.4 established an authentication mechanism ensuring that the element picker interface launches and accepts communication only when presented with a verified secret token supplied by the extension's own content script.32
Subsequent commits leading to version 1.76.0 added strict validation for filters pending creation in the element picker, neutralised potential newline smuggling, and temporarily prohibited web-accessible resource filter rules while interface boundaries were re-architected.3 Release records indicate that later revisions in the 1.76 series removed unused internal secret mechanisms and refined communication delays to prevent message racing during frame creation.
What does the flaw demonstrate about browser extension boundaries?
The vulnerability demonstrates how interactive convenience features can inadvertently create cross-privilege communication channels. Security controls that assume an embedded interface will only interact with its parent extension fail when that interface is exposed to the wider web through framing or open message channels. While the issue was successfully resolved before widespread exploitation was reported, it highlights the delicate structural balance required when content blockers mediate between untrusted websites and privileged browser APIs.
The researcher credited automated assistance from GPT-5.6 Sol with identifying the core mechanism after suspecting that filter injection might yield a universal cross-site scripting vector, while Claude assisted in drafting proof-of-concept code.2 For everyday web users, the incident underscores the importance of prompt extension updates, as modern ad-blocking tools function not merely as cosmetic filters, but as complex script-execution environments requiring the same rigorous privilege separation as web browsers themselves.
The record
23 sentences trace to 3 sources.
- 1 Element picker See the source
- 2 Universal XSS in uBlock Origin from website-driven element picker See the source
- 3 [security] "Universal XSS from website-driven element picker" · gorhill/uBlock@cbb22a5 See the source