Third-party script injects inline XSS via innerHTML sink
Unsanitized DOM sinks and prototype pollution allow compromised third-party widgets to execute arbitrary scripts unless locked down by Trusted Types and strict CSP.
SecurityPolicyViolation / TypeError: This document requires TrustedHTML assignment on Element.innerHTMLCausal Chain of Browser Mechanisms
Ordered from trigger to root invariant. Open any mechanism to inspect its internals or reproduce the behavior in an interactive lab.
Type-enforced browser defense that locks dangerous DOM sinks (innerHTML, eval, script.src) against raw strings, permitting only objects minted by audited TrustedTypePolicy sanitizers.
HTTP-header script execution allowlist using per-response cryptographic nonces and 'strict-dynamic' trust propagation to block injected scripts without brittle domain allowlists.
Prevent V8 Inline Cache deoptimizations and prototype pollution bugs—property reads walk [[Prototype]] links until a descriptor matches or the chain hits null.
Process-level browser isolation enabled by Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers, unlocking SharedArrayBuffer and high-resolution timers by blocking unverified cross-origin bytes.
Prevents silent TypeError crashes from drifted API payloads and corrupted localStorage by parsing untrusted JSON at I/O boundaries into typed structures without blocking INP.