Adding Trusted Types to YouTube

Patrick Kettner
Patrick Kettner

What's changing

We're improving the client-side security of YouTube with Trusted Types. This will provide an extra layer of protection around Document Object Model (DOM) APIs used by third-party extensions.

Trusted Types requires third-party browser extensions to use typed objects instead of strings when assigning values to DOM APIs. Starting on July 25, 2024, browser extensions that don't comply with Trusted Types security requirements may stop working after enforcement so we encourage corresponding developers to follow the Prevent DOM-based cross-site scripting vulnerabilities guide to ensure browser extensions are compatible with new YouTube security standards.

Why it's important

Enabling Trusted Types on YouTube will protect our users against a vast set of cross-site scripting (XSS) attacks. It further enhances our advanced data protection controls to keep users and data safe across more of the extensions they use everyday on YouTube.

What should I do

Viewers and creators

No action required. Users who experience issues may temporarily disable browser extensions that cause problems and inform corresponding developers. If you're having problems playing a YouTube video, we recommend opening YouTube in an incognito window with all extensions disabled. For more troubleshooting steps, see our Help Center article.

Developers

You might also want to check this list of frameworks and libraries that could help make your extension Trusted Types compliant (you may be using an old third-party library that is worth updating).

To ensure a seamless experience for users, it is recommended that browser extensions are made Trusted Types compliant before the security feature is rolled out on YouTube. Failure to make code Trusted Types compliant may cause feature breakages for third-party extensions as their DOM manipulations will be blocked by the browser.