{"slug": "ublock-origin-patches-one-click-universal-xss-flaw", "title": "uBlock Origin patches one-click universal XSS flaw", "summary": "A security researcher, using GPT-5.6 Sol to surface the idea and Claude to help write most of the proof-of-concept, found a one-click universal XSS in uBlock Origin's element picker: a malicious page could recover the extension's randomized UUID, embed the picker in a hidden iframe, and smuggle a trusted scriptlet filter through the picker's `opt` field to run JavaScript on any domain. The MV2 Firefox build carried the full UXSS, while uBO Lite (MV3) had a less severe variant; both are now patched, with one fix adding a secret password the real content script passes to the picker so attacker iframes cannot impersonate the legitimate initiator.", "body_md": "A malicious website could make uBlock Origin inject arbitrary JavaScript into any other site, triggered by a single click anywhere on the attacker's page. The bug was in the element picker, the tool you summon by right-clicking a page to build a filter that hides an element without reloading. The MV2 Firefox build had the one-click universal XSS; uBO Lite, the MV3 build, had a related but less severe variant. Both are now patched, and the GitHub advisory has the specifics.\n\nThe researcher credits GPT-5.6 Sol with finding the issue after being pointed at the idea that filter injection might yield UXSS, then verified it and wrote up the result, with Claude producing most of the proof-of-concept code.\n\nThe element picker is an iframe the extension injects into the page, loaded from a URL like `moz-extension://<UUID>/web_accessible_resources/epicker-ui.html`. That iframe can message the extension's background script and ask it to add a filter. Filters added this way are treated as trusted, and a trusted filter can carry a scriptlet that runs JavaScript in the target page. A website that can drive the picker and get one trusted filter committed can therefore run code on any domain.\n\nThe attack is four steps: recover the picker's URL, embed it in an invisible iframe, feed the picker the filter you want, and get the user to click the hidden Create button.\n\nOn Firefox the picker URL depends on the extension's internal UUID, which is randomized per installation. On a default install, uBO ships a filter from uAssets, `lootdest.*##+js(no-fetch-if, adsbygoogle, war:googlesyndication_adsbygoogle.js)`, that hooks `fetch`. When it fires, it makes an XHR to `moz-extension://<UUID>/web_accessible_resources/googlesyndication_adsbygoogle.js` and returns that response as the fetch body, swapping a request for ad-server JavaScript with a harmless stub that keeps the same API. The attacker's page can override `XMLHttpRequest.prototype.open`, trigger the filter with `fetch('/adsbygoogle.js').catch(() => {})`, and read the `moz-extension` URL, and with it the UUID, out of the XHR the hook makes. The researcher notes this is only one of several ways the UUID can leak.\n\nWith the URL known, the page sets an iframe's `src` to the picker and talks to it over a MessageChannel: `iframe.contentWindow.postMessage({ what: 'epickerStart' }, '*', [ch.port2])`. The picker replies with a start message; the attacker sends `showDialog` with a filter and a `resultsetDetails` message to enable the Create button and set `opt`.\n\nThe picker normally restricts what you can enter and blocks scriptlet filters. The bypass is that `opt` field in the second message. `opt` is meant to be the network-request type to match, like `image`, and gets appended to the filter after a `$`, producing `$image`. Since the attacker controls it, a newline turns one value into two lines: `\"image\\ngoogle.com##+js(trusted-rpnt, script, ...)\"` smuggles in an arbitrary trusted filter that injects a script.\n\nThe root problem is that the picker accepted messages from whatever embedded it. One of the fixes adds a secret password that the real content script hands to the picker, which the picker includes in its opening postMessage, so an attacker's iframe cannot impersonate the legitimate initiator.\n\nThe researcher did not build the clickjacking step but describes it: overlay content on the embedded picker or set the iframe to `opacity: 0`, then position it under something the user will click. One click anywhere on the page is enough to commit the filter.\n\nTrusted filters from the picker stay trusted until a recompile, and editing your custom filters forces a recompile that clears the trust. That does not help a victim much, because the attacker can just open the target site immediately after the filter lands.", "url": "https://wpnews.pro/news/ublock-origin-patches-one-click-universal-xss-flaw", "canonical_source": "https://dev.to/randomchaos/ublock-origin-patches-one-click-universal-xss-flaw-2p2m", "published_at": "2026-11-21 06:25:21+00:00", "updated_at": "2026-11-21 06:41:54.964718+00:00", "lang": "en", "topics": ["ai-safety", "developer-tools"], "entities": ["uBlock Origin", "uBO Lite", "Firefox", "GPT-5.6 Sol", "Claude", "uAssets"], "also_reported_by": [], "takeaway": "An extension iframe that accepts postMessage from any embedder can be hijacked: uBlock Origin's picker let an attacker inject a newline into the `opt` field to smuggle a trusted scriptlet filter, fixed by requiring a secret password in the picker's opening message.", "recommendation": {"advice": "Authenticate messages between embedded iframes and privileged extension code with a per-session secret, and never concatenate untrusted fields like `opt` into filter strings without rejecting newlines.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/ublock-origin-patches-one-click-universal-xss-flaw", "markdown": "https://wpnews.pro/news/ublock-origin-patches-one-click-universal-xss-flaw.md", "text": "https://wpnews.pro/news/ublock-origin-patches-one-click-universal-xss-flaw.txt", "jsonld": "https://wpnews.pro/news/ublock-origin-patches-one-click-universal-xss-flaw.jsonld"}}