Universal XSS Flaw in uBlock Origin Element Picker
uBlock Origin’s element picker—the right-click feature for creating custom content filters—harbored a flaw that allowed attackers to inject arbitrary JavaScript filters. These trusted filters run with broad permissions, enabling arbitrary code execution across any website the victim visits.
The attack begins by extracting the extension’s randomly-generated UUID through XMLHttpRequest interception of legitimate filter operations. The attacker then embeds the element picker iframe on their malicious site, sends crafted postMessages to manipulate it, and exploits newline injection in filter options to bypass validation checks. An invisible, positioned iframe captures an unsuspecting user click to install the malicious filter.
The core vulnerability stemmed from the element picker accepting commands without authentication. The fix implements a shared secret between the content script and picker interface. The vulnerability primarily affected Firefox’s MV2 version; the MV3 variant had inherent limitations making it harder to exploit. Once installed as a trusted filter, malicious code persists until the user manually recompiles their filters.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.