Cross-Site Scripting (XSS)
Last updated
Last updated
Cross-site scripting (XSS) is a vulnerability that allows an attacker to compromise the interactions that users have with a vulnerable application. Cross-site scripting works by manipulating a vulnerable website so that it returns malicious JavaScript to users. When malicious code executes inside a victim's browser, an attacker can fully compromise their interaction with the application.
You can find more details at .
This page contains recommendations for the implementation of protection against Cross-Site Scripting (XSS) attacks.
Make sure all variables go through input validation and are then escaped or sanitized.
Use stable versions of modern JavaScript frameworks such as Angular, Vue or React and their protection mechanisms.
Implement input validation, see the page.
Implement output encoding, see the page.
Implement HTML sanitization, see .
Comply with requirements from the page.
Enforce strict Content Security Policy, see the page.