XSS Vulnerability Lab

This is a simplified, insecure environment. Do not use this code in production.

1. Copy this Payload:

Because this is a client-side demo, we use an image tag to trigger the alert immediately:

<img src=x onerror=alert('HACKED')>

Demo A: Reflected XSS

Type the payload above into the search bar. It will be "reflected" immediately.

Result: Waiting for input...

Demo B: Stored XSS

Post a comment with the payload. Refresh the page. The attack persists because it is saved.


No comments yet.