Will It Vibe logoWill It Vibe?
REACT-001High severity-15 points

dangerouslySetInnerHTML used

Part of Security, which counts for 30% of the overall score. When this check fires it deducts 15 points from that category, once per scan, no matter how many places it turns up.

What it detects

dangerouslySetInnerHTML injects a raw HTML string into the DOM and bypasses React auto-escaping, so any user-influenced value there is a stored/reflected XSS sink.

Why it matters

dangerouslySetInnerHTML writes a raw HTML string into the page and turns off the escaping React normally does for you. If any part of that string comes from user input, a profile bio, a comment, a CMS field, an attacker can inject a script tag or an onerror handler that runs in your users' browsers and steals their sessions. Content that looks static today often starts carrying user data later.

How to fix it

Where the value is plain text, render it as normal JSX children so React escapes it. Where you genuinely need to render HTML (rich text, markdown output), sanitize it first with DOMPurify and keep the sanitize call right at the render site. Do not build the HTML string by concatenation.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Security checks