uBlock Origin: How to Protect Yourself from the Selector XSS Flaw

uBlock Origin: How to Protect Yourself from the Selector XSS Flaw

A malicious page could add trusted filters to uBlock Origin and use that capability to execute JavaScript on other sites. The flaw affected the MV2 version for Firefox; uBO Lite, the MV3 variant, also had a similar issue, described as less severe. The vulnerability has been fixed: check the extension and update it.

Who should check the extension

The alert focuses on uBlock Origin for Firefox on MV2. The researcher explained that a site could embed the extension's element picker in an invisible frame, manipulate it to prepare a filter, and place the creation button where the victim would click. That filter could be «trusted» by the extension and inject JavaScript code into web pages.

The description also mentions uBO Lite, the MV3 variant, which was affected by a similar issue, although it was less concerning. No details are provided about the differences or a specific version that fixes it. If you use Lite, update it through the browser and check the release notes for the installed version; do not assume that a specific version is fixed based on the uBlock Origin version number.

The attack was not triggered simply by visiting a page: it required a click from the victim. The person who discovered the issue said they did not implement that part of the click capture; they described how it could be done using an overlay or an invisible frame. The relevant risk is that a deceptive website could turn an ordinary click into approval of the filter.

What to do, step by step

  1. Identify which extension you have installed. Check its name in the browser's add-ons or extensions manager. Distinguish uBlock Origin from uBO Lite: they are different products, and the security advisory does not attribute the same level of impact to Lite. If you use neither, this specific vulnerability does not require you to change anything.

  2. Check your uBlock Origin version. In Firefox, open the add-ons manager and check the extension details. The GitHub releases page lists stable version 1.76.0 with the security entry «Universal XSS from website-driven element picker»; it also lists 1.76.4 as a later stable version. Therefore, 1.76.0 or later is listed after the specific fix in published releases.

  3. Update through the browser's official channel. If Firefox offers a pending update, install it. The uBlock Origin releases page says that the stable version for Firefox is distributed through AMO, Mozilla's add-ons catalog. Avoid installing packages found on third-party websites. Then check the details again to confirm that the installed version has changed.

  4. Update uBO Lite separately. If you use that extension, apply any available update from the browser's extension store. The published information confirms a similar issue, but does not specify a fixed version of Lite; therefore, do not use uBlock Origin's version 1.76.0 as a reference for deciding whether Lite is up to date.

  5. Check recently created filters if you remember clicking a button or an area of a suspicious page while the picker was open. The flaw could add custom filters. In «My filters» —uBlock Origin's personal filters section— look for entries you do not recognize and delete only those you can identify as unwanted. Do not delete the entire list without checking: you could remove rules you added legitimately.

  6. If you notice anything unusual, update first and then check your custom filters again. The researcher noted that a subsequent change to those filters triggers recompilation, which removes the trust from affected filters, but warned that this was not reliable protection if the malicious site could be opened immediately afterward. Do not use editing filters as a substitute for installing the fixed version.

What you should not do

Do not accept filters without reading them just because they appear in the element picker. The feature is designed to create rules that block elements on a page, but the flaw allowed a site to control messages sent to the picker and bypass its normal restrictions. If the filter text does not match what you were trying to block, cancel instead of clicking «Create».

Do not assume the frame will be visible. The technique described could hide the picker with zero opacity or cover it with other elements. If a page asks you to click to continue and the gesture coincides with an unexpected action by the picker, do not do it. Close the page and make sure the extension is up to date.

Nor should you trust that the UUID is secret: the extension's internal identifier in Firefox was random for each installation, but the researcher described ways to obtain it. Hiding that information or deleting filters afterward is no substitute for the fix. uBlock Origin version 1.76.0 explicitly identifies the vulnerability among its security changes.

Sources: loops, GitHub, Glonce