Level 1 · Apprentice0 XP
Two attacks that make a victim's own browser work for the attacker.
Step 1 / 5
ProblemYour site shows user comments. Someone posts a comment that is really a script. Every visitor's browser runs it, on your site, with their login. It can read their data and act as them.
← → step
Before this: Injection
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Search a front-end project for dangerouslySetInnerHTML, innerHTML or v-html. For each use, decide whether a user could control the content, and replace it with plain text rendering where possible. Then check that your session cookie is HttpOnly, Secure and SameSite.