Urgent.News

What's breaking now, across thousands of outlets.

Tech

Universal XSS in uBlock Origin from website-driven element picker

Earlier this month, a security researcher discovered a serious vulnerability in the uBlock Origin extension, specifically a one-click universal XSS issue in the Firefox version. This issue allowed a malicious website to trick the extension into adding arbitrary trusted filters, which could then inject JavaScript code into any page.

The extension uses an element picker feature, accessible through a right-click action, to create filter rules without leaving the page. This picker is implemented by injecting an iframe from a specific URL, which communicates with the extension's background script to add filters. On Firefox, the main filter rule in place hooks the fetch function to replace network requests to ad servers with a dummy script.

The attacker can extract the random extension UUID from the extension's fetch hook. With this information, they can make the malicious website trigger the filter by making an XHR request to the extension UUID's webpage, initiating the filter addition process.

Using the injected iframe, the attacker can create a MessageChannel and send a message to the element picker to enable the filter creation process. They can then create arbitrary trusted filters by manipulating the filter string to include a script tag, effectively bypassing the picker's restrictions. This vulnerability stems from the element picker not properly validating messages from potential attackers.

The researcher suggested implementing a password mechanism to ensure the element picker only accepts messages from trusted sources. However, attackers could potentially overlay the picker or make it invisible to exploit this vulnerability. Trusted filters added by the picker are typically treated as trustworthy until an application recompile, which in practice can be bypassed if the attacker opens the victim's webpage shortly after.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at iter.ca →

More in Tech

Migrating from GitHub to Codeberg

  • Author migrated personal projects from GitHub to Codeberg in 2023
  • Chose Codeberg for free software principles and anti-AI policy
  • Manual migration of 70+ repositories due to automation difficulties

More from Monday 16 November →