Universal XSS in uBlock Origin from website-driven element picker

475 points · 137 comments on HN · read original →

Points and comments are a snapshot, not live.

A one-click universal XSS in uBlock Origin allowed arbitrary trusted filter injection via the element picker.

The author found a one-click universal XSS in uBlock Origin (MV2 Firefox version; MV3 Lite was also affected). A malicious website could extract the extension's random UUID via a filter rule that hooks fetch, then embed the element picker in an invisible iframe. By driving the picker with postMessage, the attacker could inject arbitrary trusted filters, including scriptlet filters, by embedding a newline in the `opt` field. This allowed running arbitrary JavaScript in any site context. The fix added a secret password to the element picker's initial postMessage.

Trusted filters from the element picker persist until a recompile, so the attacker could immediately open the victim site.

What commenters are saying

Commenters highlighted the irony that uBlock Origin's own filter used to block ads can leak its UUID as a tracker. Several noted extensions' need to inject DOM for UI is a broader security issue, with XUL extensions having better isolation. One camp argued ad blocking is essential for security given malicious ads; another pointed out that the real problem is extensions lacking a proper overlay API to avoid page interference. Others discussed the author's disclosure of AI assistance, with some praising it as a signal of human authorship and others predicting AI will eventually mimic such disclaimers.