vulns.co
/
GKData.io MCP and API Buy me a coffee

World Wide Web Consortium

Trusted Types: typed sinks depend on trustworthy policy creation

The Trusted Types draft defines how browsers can require policy-created values instead of ordinary strings at injection-sensitive APIs. This centralizes checks, but the policies must still make safe decisions: a matching type alone does not make a value safe. The reviewed Working Draft is not a final standard and does not protect every DOM operation or isolate malicious first-party code.

Open the referenceTechnical StandardReviewed 2026-10-03

How to use this reference

Editorial reasoning: check two things separately: that protected APIs accept only policy-created values, and that each policy enforces the rules needed for safe use. Limit which code can create policies. Review each policy together with the code and state it depends on, and avoid global state that can silently change its decisions. As the maintainer FAQ explains, having a sanitization library is not enough if the application does not consistently use it.

Before reading

  • JavaScript DOM data flow and Content Security Policy

Context and limits

  • The reviewed edition is a Working Draft, not a final W3C Recommendation. Krzysztof Kotowicz is its listed editor; Mike West is listed as former editor.
  • Unsafe policies can preserve DOM injection risk. The design does not isolate actively malicious first-party code or guard every DOM operation.
  • The FAQ distinguishes client-side sink controls from server-generated injection and complementary CSP defenses. Its 2021 browser-support discussion is historical and is not used as current compatibility evidence.

Sources

  1. Trusted TypesWorld Wide Web Consortium · reviewed 2026-10-03
  2. Trusted Types publication historyWorld Wide Web Consortium · reviewed 2026-10-03
  3. Trusted Types FAQW3C Trusted Types project · reviewed 2026-10-03

Record reviewed 2026-10-03. Snapshot af2809c308fc. Open the complete JSON contract.

Library synced 2026-11-18 · cases last reviewed 2026-10-05

af2809c308fc · JSON exports & schemas · CC BY 4.0 content / MIT software