Vulnerability in uBlock Origin that allows injecting JavaScript code into other websites

A vulnerability has been identified in the uBlock Origin browser extension for blocking unwanted content (CVE not assigned), allowing the addition of a new filter that operates on other sites. The filters inject JavaScript code onto pages, giving attackers the ability to execute their JavaScript code in the context of any site. To carry out the attack, it is sufficient for the user to click on the attacker's page. Executing JavaScript code in the context of another site allows intercepting sensitive data entered by the user and modifying information on pages, for example, replacing cryptocurrency wallet numbers and download links. The issue has been resolved in uBlock Origin version 1.76.0.

The vulnerability exists in the 'Element picker' interface mechanism for adding custom blocking rules and filters, which can be triggered while viewing a page through the context menu. The interface is displayed by injecting an iframe into the current page and loading content into it via the URL 'moz-extension://UUID_extension/web_accessible_resources/epicker-ui.html'. This service page interacts with the background handler of the extension and forwards information about the user's added rules and filters.

The attack consists of adding an invisible iframe to the attacker's page, loading the 'Element picker' content from the uBlock Origin service URL. A new filter is then injected into the loaded interface, bypassing verification by substituting data through the opt field, separated by newline characters. This sets the stage for a user click (for example, a consent or consent denial request for transferring cookies), and the position of the invisible iframe is adjusted so that the click targets the invisible 'Create' button in the uBlock Origin interface.

To conduct an attack, one must determine the extension identifier (UUID), which is randomly generated upon installation. To discover the UUID, a trick was used to intercept the fetch operation. To block certain resources, uBlock Origin intercepts the fetch call and performs an API XMLHttpRequest to the extension via a service URL, such as "moz-extension://UUID_extension/web_accessible_resources/googlesyndication_adsbygoogle.js". An attacker can learn the UUID by intercepting the XMLHttpRequest call on their page and triggering the uBlock Origin filter by executing "fetch('/adsbygoogle.js').catch(() => {});".

The vulnerability report mentions that a similar issue also occurs in the uBlock Origin Lite (uBO Lite) extension, which uses the third version of the Chromium manifest, but it is not as dangerous as in the uBlock Origin extension based on the second version of the manifest, which continues to be distributed for Firefox.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster