Secure Legion Labs
Stored XSS Lab
This lab simulates a comment system that stores user-supplied content and renders it later. The goal is to understand persistence, second-view execution, and why stored XSS is often more dangerous than reflected issues.
Comment submissionlocalStorage comment storeinnerHTML comment listThe page applies a weak string filter before storing the comment. That can block some obvious cases while still leaving practical payload paths for an attacker.
replace(/script/gi, "")
replace(/alert/gi, "blocked")Submit a comment, refresh the page, and observe how the stored content is rendered again.
secureLegionStoredXssCommentsThe feed below renders stored comments through innerHTML, which simulates a stored XSS execution point.
Status: waiting for stored input.
The flag appears after the stored payload path is recognized.
Submit the unlocked flag to complete the stored XSS room.
Flag is locked until you trigger the challenge condition.
The attacker stores content through the comment form.
The app saves the result and treats it as trusted later.
When the feed loads again, the stored HTML reaches the sink.