CSACyber Security AuditWebbandflow
Web application vulnerabilities High

Cross-Site Scripting (XSS)

A flaw that lets an attacker run their own scripts in another user's browser via a vulnerable site.

What it is

Cross-Site Scripting happens when a website includes untrusted input in a page without properly neutralizing it, allowing an attacker's script to run in a victim's browser. The malicious script runs with the trust the user places in the site, so it can read data on the page, steal session information, or act as the user. It comes in several variants depending on how the input reaches the page.

Why it matters

XSS can let an attacker hijack user sessions, steal data, or deface content, all while appearing to come from your trusted site.

How to fix it

Treat all user input as untrusted and encode it correctly for the context in which it appears, validate input, and deploy a strong Content Security Policy as a backstop.

Related terms

References

← Back to the glossary