An analysis of a popular Google Chrome ad block extension for YouTube has uncovered the ability to execute arbitrary JavaScript code.

According to Island, the extension, named Adblock for YouTube (ID: cmedhionkhpnakcndndgjdbohmhepckk), has more than 10 million installs and carries a Featured badge on the Chrome Web Store.

The extension description states that it allows users to prevent web page elements like ads, including preroll ads, from being displayed on the video sharing platform, as well as on external sites that load YouTube. While the add-on offers the promised functionality, it also features capabilities to run arbitrary JavaScript code.

"It also contains the architectural ingredients for arbitrary JavaScript execution on any website, activated by a single server-side configuration change, without an extension update, without a store review, and without any visible sign that something has changed," researchers Oleg Zaytsev and Shachar Gritzman said in a report shared with The Hacker News.

"In practical terms, that could mean reading pages, stealing data, and acting as the user inside personal accounts, work apps, admin panels, and other sensitive browser sessions."

It's worth emphasizing here that there is no evidence malicious payload has been distributed to users in this manner, but the mere presence of the capability, coupled with ties to other ad-blocking extensions that have since been removed from the storefront for malware, raises privacy and security risks, Island added.

The list of related extensions that have been taken down is listed below -

  • Adblock for Chrome (ID: onomjaelhagjjojbkcafidnepbfkpnee)
  • Adblock for You (ID: ogcaehilgakehloljjmajoempaflmdci)
  • AdBlock Suite (ID: gekoepiplklhniacchbbgbhilidiojmb)

Adblock for YouTube has been on the Chrome Web Store since 2014, starting off as a basic YouTube ad blocker before it changed ownership four years later. Early iterations of the extension were found to ship with an ad-injection software development kit (SDK) named Unistream SDK, although it was removed in June 2024.

What's been constant is the presence of remote-controlled script injection paths since February 2025. The extension ships a library of scriptlets, small JavaScript functions used for ad blocking, and the server selects which ones run and with what arguments. One of them, trusted-create-element, creates an HTML element on the page.

If the server passes "script" as the element type and supplies JavaScript as the content, the element runs in the page context and can read sensitive data. The trusted-create-element scriptlet is part of AdGuard's open-source scriptlet library that other ad blockers also ship, so the scriptlet code is not written by the extension author. The risk Island flagged is the server-controlled path that can reach it after installation, with no update and no store review.

"At the time of our analysis, trusted-create-element was not active in the server response," the researchers explained. "The capability is dormant, not absent. Activating it requires a single server-side change, no extension update, no store review."

Compounding the risk further is the fact that ad blocker extensions typically request extensive permissions to inspect requests, alter pages, hide elements, and adjust their behavior as ad systems evolve.

Specifically, it's been found that contrary to its name, the extension runs on every website a user visits on the browser, while adding a check that activates only when the current URL contains "youtube.com." However, in reality, the check only verifies if the string corresponding to "youtube.com" appears anywhere in the URL, and does not validate the hostname, frame origin, or embedded player context.

This means that the check can be trivially bypassed by putting youtube.com anywhere in the URL, as depicted in the following URL patterns -

  • www.facebook.com/page?ref=youtube.com
  • bank.example.com/search?q=youtube.com
  • internal.corp.com/redirect?from=youtube.com

"The concern is not a single suspicious line of code," Island said. "It is the combination: a high-install extension with all-site access, a remote-controlled injection path, prior ad-injection infrastructure, a major ownership and codebase change, and related extensions that were removed from the Chrome Web Store for malware."

The disclosure comes as Palo Alto Networks Unit 42 said it detected 18 browser extensions impersonating consumer brands with an aim to monetize through affiliate marketing.

"Upon installation, all extensions open the .shop domain in a new tab," Unit 42 said. "The .shop domain redirects to another domain. The domain presents a page citing that further action is required. The page cites incompatibility issues and asks users to install a gaming-oriented browser."

Update: AdBlock Ltd Says Fix Is Coming

After publication, AdBlock Ltd founder Mathias Rochus emailed The Hacker News to say the extension has never used the capability and never will, citing its 4.4 rating across hundreds of thousands of reviews. He said the company is preparing a Chrome Web Store update with two changes. 

The page check will validate the YouTube hostname instead of matching the string anywhere in the URL. The server configuration will no longer be able to create or inject an executable script on the page. The update still has to pass Google's review before it reaches users.

Rochus also said the trusted scriptlets named in the report, including trusted-create-element, are not code his company wrote. He said they are part of AdGuard's open-source scriptlet library that mainstream ad blockers ship, and that the extension's server sends configuration that selects which built-in scriptlet runs.

That matches the scriptlet model in Island's research. He said this does not change the company's position that the server configuration can reach the script-creating scriptlet, which is what the planned update closes.

Correction: An earlier version of this article described trusted-create-element as a scriptlet defined by the extension author. The scriptlet is part of AdGuard's open-source scriptlet library that other ad blockers also ship. The text has been corrected.

Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.