Security·Intermediate·Conceptual·1 min read
What is cross-site scripting?
Short interview answer
XSS occurs when attacker-controlled data is interpreted as executable script or active markup within a trusted origin. Stored, reflected, and DOM-based labels describe delivery paths; the core failure is data crossing into an unsafe execution context without the correct encoding, sanitization, or policy.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.