SiteShadow
Back to vulnerability library

CWE-80 Basic Cross-Site Scripting

What this means

SiteShadow flagged output that may include untrusted data without proper encoding/escaping, allowing it to be interpreted as HTML or script in a browser.

Why it matters

XSS enables script execution in user browsers.

Safer examples

1) Use safe text APIs (DOM)

el.textContent = userInput; // safe
// el.innerHTML = userInput; // risky

2) Sanitize if you must render user-provided HTML

import DOMPurify from "dompurify";
el.innerHTML = DOMPurify.sanitize(userHtml);

3) Escape by default in templates

Use templating/framework defaults that escape output by default; avoid "raw HTML" escape hatches.

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Request access View coverage