Home / Blog / Universal XSS in uBlock Origin from website-driven element…
Tech News

Universal XSS in uBlock Origin from website-driven element picker

A universal XSS flaw in uBlock Origin allowed malicious sites to inject trusted filters and execute arbitrary code, which the vendor fixed via GitHub advisory.

By Dillip Chowdary • Nov 16, 2026 • Source: iter.ca

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

At a glance

Affected product
uBlock Origin and uBO Lite
Affected platform
Manifest V2 Firefox and Manifest V3
Discovery method
GPT-5.6 Sol analysis with Claude PoC
Vulnerability class
One-click universal cross-site scripting
Resolution status
Fixed via GitHub security advisory

A one-click universal cross-site scripting vulnerability in uBlock Origin allowed malicious websites to inject arbitrary trusted filter rules, according to iter.ca's report. The flaw was identified using GPT-5.6 Sol and verified by the researcher, with Claude generating the proof-of-concept code. Developers have resolved the issue, with technical specifics published in a GitHub security advisory.

This report details how attackers extract internal extension identifiers, manipulate element picker message channels, and execute scriptlets inside third-party origins. It is designed for engineers and security practitioners evaluating extension privilege boundaries. Readers will examine identifier leakage, message tampering, and the security fixes deployed by developers.

01Element picker and background script bridge

The content blocker includes an interactive element picker launched by right-clicking on any active webpage. This tool allows users to create custom rules to block page elements directly without leaving the document. To render this visual interface, uBlock Origin injects an iframe pointing to an internal extension resource path.

The injected interface communicates directly with the privileged background script to register new filtering directives. Because rules created through this picker are treated as trusted filters, they can inject JavaScript into web pages. Controlling this frame allows an attacker to install arbitrary filtering rules across external domains.

The attack workflow executes through four distinct operational stages:

  1. Identify extension address Locate the internal extension UUID to construct the element picker resource path.
  2. Embed invisible frame Inject a hidden iframe pointing to the picker with opacity set to zero.
  3. Transmit automated messages Send synthetic channel messages to insert malicious filter directives into the dialog.
  4. Capture user interaction Align the transparent interface so an ordinary page click activates the creation trigger.

02Internal extension identifier leakage via fetch

On Firefox, referencing internal extension assets requires discovering an internal UUID generated randomly for each installation. The default configuration includes a filter rule from uAssets that intercepts network requests matching ad server scripts. When triggered, this hook intercepts fetch calls and issues an XMLHttpRequest directed to a local dummy script.

A hostile webpage can override XMLHttpRequest.prototype.open to capture the local extension URL during redirection. The site calls fetch for the targeted script name, triggering the hook and exposing the internal UUID string. The researcher noted that several alternative techniques can also leak this installation identifier.

Once the script captures the unique identifier from the intercepted request, it constructs the full resource destination. The attacker assembles the target address pointing to the epicker-ui.html file within web accessible resources. This address provides everything required to embed the administrative picker frame inside an unauthorized web context.

03Embedded frame and message channel control

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

After constructing the resource location, the hosting page generates an iframe pointing to the internal element picker page. The site initializes a MessageChannel instance to establish two-way communication with the embedded window. By dispatching an epickerStart event through postMessage alongside a transferred port, the attacker establishes control over the dialog.

The embedded interface responds with an initialization signal, allowing the hostile parent page to send configuration commands. The attacker dispatches a showDialog instruction containing a baseline filter pattern, followed immediately by a resultsetDetails message. This payload enables the interactive creation button and establishes the internal option parameter for request matching.

Although the dialog typically waits for an intermediate response before accepting configuration data, immediate message transmission succeeds. Bypassing the expected handshake permits immediate configuration of dialog parameters before the user observes any anomalies. The interface accepts these synthetic commands because the original implementation lacked validation verifying caller identity.

04Arbitrary scriptlet filter newline injection

The element picker normally restricts manual input to prevent users from adding unauthorized scriptlet filters through the visual interface. Attackers bypass this validation boundary by targeting the opt parameter inside the secondary message payload. This field specifies a network request category such as image and appends a dollar sign to the filter string.

Because the element picker failed to sanitize this field, an attacker can embed newline characters directly within the string payload. Setting the value to an image identifier followed by a newline allows the injection of a secondary rule targeting external websites. The payload specifies a trusted scriptlet filter capable of executing arbitrary JavaScript.

The core security failure stems from the element picker accepting unrestricted message events from untrusted origins. To resolve this vulnerability, developers updated the interface to require an authentication password generated by the content script. Under the patched implementation, the element picker only accepts configuration instructions accompanied by this shared secret token.

05Transparent frame overlay and click execution

To complete the exploit without alerting the visitor, a malicious website positions the element picker frame directly beneath the cursor with opacity set to zero. Any subsequent click on the page registers against the transparent interface, activating the hidden Create button. This interaction commits the injected rule into extension storage without displaying confirmation prompts.

The architectural impact of the security boundary failure varied across different extension manifests and deployment models, producing distinct operational risk profiles:

Extension editionExtension specificationImpact severity
uBlock OriginManifest V2 FirefoxHigh severity universal cross-site scripting
uBO LiteManifest V3Lower severity restricted issue

Note: Filters added by the element picker remain trusted until a recompile occurs, such as when a user manually modifies custom filters, though immediate exploitation renders that cleanup moot. Because attackers can instantly redirect the browser to target pages, the temporary nature of filter trust offers minimal protection against active exploitation.

Frequently asked questions

What caused the universal XSS flaw in uBlock Origin?

An attacker could embed the extension element picker in an invisible frame and send postMessage events to insert arbitrary trusted filters containing executable scripts.

How did attackers find the internal extension URL?

Attackers hooked XMLHttpRequest to capture the random extension UUID leaked when uBlock Origin executed its default fetch filtering hook.

Which versions of the extension were affected?

The issue primarily affected the Manifest V2 Firefox edition, while a similar but less problematic flaw affected Manifest V3 uBO Lite.

How was the element picker vulnerability resolved?

Developers updated the element picker to require a secret password passed from the content script, blocking unauthorized messages from external web pages.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →