XSS
Cross-Site Scripting: an attack where malicious scripts are injected into trusted websites. Prevented by sanitizing user input and setting Content-Security-Policy headers.
What is XSS?
Cross-Site Scripting: an attack where malicious scripts are injected into trusted websites. Prevented by sanitizing user input and setting Content-Security-Policy headers.
XSS is a intermediate-level concept that sits in the Security Architecture area of system design. Engineers reach for it whenever they need to reason about real-world trade-offs in that space — not just for textbook correctness, but because real production systems at companies like Netflix, Amazon, and Google make these decisions every day.
If you want to go deeper than this definition — with diagrams, code, and a quiz to lock it in — work through the "XSS" lesson linked below. It walks through the why, the mechanism, the trade-offs, and how the giants actually use it in production.
Learn XSS in depth
Full interactive lesson with diagrams, code examples, real-world references, and a quiz.
Open the XSS lessonRelated lessons
Lessons that touch on XSS as part of a larger topic.
Output Encoding
Securing outgoing data by encoding it for the correct context
foundation · core fundamentals
Input Sanitization
Cleaning and validating all user input before processing, the first line of defense against injection attacks
intermediate · security architecture
Web Application Firewall (WAF)
Filtering malicious HTTP traffic before it reaches your application, blocking SQL injection, XSS, and other web attacks at the edge
intermediate · security architecture
See also
Related glossary terms you might want to look up next.
CSRF
Cross-Site Request Forgery: an attack that tricks a logged-in user's browser into sending unwanted requests to a site where they're authenticated. Prevented with tokens.
WAF
Web Application Firewall: filters and monitors HTTP traffic between a web application and the internet. Blocks SQL injection, XSS, and other OWASP top-10 attacks.
CORS
Cross-Origin Resource Sharing: a security mechanism that controls which domains can access your API. The browser enforces it; the server configures it.