DOM-based XSS

Cross-site scripting that happens entirely in the browser, when page JavaScript copies attacker-controlled data, such as part of the URL, into a dangerous sink.

It gives attackers script execution in your origin without any server bug.

In more detail

The server may never see the attack. Trusted Types stops it at the root by refusing plain strings at sinks such as innerHTML.

Related terms

Taught in

References