Reflected XSS on 404 Error Page
Red social donde la pagina de error 404 refleja el parametro message en el HTML sin sanitizar, permitiendo XSS reflejado.
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
Reflected XSS on 404 Error Page
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 pagina de error 404 que refleja un parametro de la URL.
La vulnerabilidad
La pagina 404 muestra ?message= directamente en el HTML sin escapar, permitiendo inyeccion de HTML y JavaScript.
Cadena de ataque
1. Visitar /404
2. Anadir ?message=<img src=x onerror=alert('XSS')>
3. XSS ejecutado
Solucion interactiva
Accede a /writeup dentro de la aplicacion para una guia paso a paso con botones interactivos.
Flag
(alert ejecutado)
Remediacion
- Escapar HTML en todos los outputs
- Usar textContent en vez de innerHTML
- CSP con nonces