Cross-Site Scripting - Stored XSS
In a stored XSS attack, malicious JavaScript is permanently stored on the target server and executes in every victim's browser who views the infected page. It is one of the most dangerous web vulnerabilities.
Attack State
Attacker
Scanning
Victim
Safe
Payload
XSS Payload
-
Stolen Data
-
Prevention
HTML encode output
Use Content-Security-Policy
HttpOnly cookies
Input validation
Use Content-Security-Policy
HttpOnly cookies
Input validation
Event Log