Skip to content
ShankarStack
HighXSS

Cross-Site Scripting (XSS)

Untrusted data reaches a browser context without proper encoding, allowing script execution in a victim's session.

XSS arises when applications include untrusted data in rendered output or the DOM without context-appropriate encoding or sanitisation.

Root cause

Output is not encoded for the context (HTML, attribute, JS, URL) in which untrusted data appears.

Impact

Attacker-influenced script can run in users' browsers, affecting session integrity and confidentiality.

Detection methodology

Trace untrusted inputs to output sinks; verify contextual encoding and template auto-escaping.

Remediation

Apply context-aware output encoding, use framework auto-escaping, sanitise rich input, and deploy a strong Content-Security-Policy as defence in depth.

Secure coding guidance

Treat all dynamic output as untrusted; avoid dangerous sinks like innerHTML; adopt CSP.