Skip to main content

Cross-Site Scripting Payload

Definition

A Cross-Site Scripting payload is a segment of malicious code, typically JavaScript, injected into a trusted website. This code executes within a user’s web browser when they visit the compromised site. The payload’s purpose is to steal session cookies, deface websites, or redirect users to malicious pages. It represents the active component of a Cross-Site Scripting attack.