Checks · HYG-005

HYG-005 · dangerouslySetInnerHTML with user input

P1 Needs attention

Why it matters

Writing user text into HTML lets a visitor run script in another visitor's browser.

How we detect it

A taint rule follows user input into dangerouslySetInnerHTML.

How we fix it

Render text, or sanitise with a maintained library if HTML is required.

Can it be fixed automatically? Yes, with a template change

Related checks

HYG-005 · dangerouslySetInnerHTML with user input — Rivyva