CSRF Form-Based Post Creation
Red social donde los endpoints de crear posts y actualizar perfil son vulnerables a CSRF basado en formularios HTML clasicos.
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
CSRF Form-Based Post Creation
Community writeups
Despliegue
# Opcion 1: autodeploy
./autodeploy.sh
# Opcion 2: manual
docker compose up --build
# Acceder
https://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 es una red social con posts y perfil editable.
La vulnerabilidad
POST /api/posts y POST /api/users/profile aceptan peticiones sin token CSRF. Un formulario HTML con action apuntando al endpoint y method=POST puede crear posts o modificar el perfil de la victima.
Cadena de ataque
1. Crear formulario HTML oculto
2. action=https://target/api/posts, method=POST
3. Campos ocultos con contenido del post
4. Auto-submit con JavaScript
5. Victima visita → Post creado en su nombre
Solucion interactiva
Accede a /writeup dentro de la aplicacion para una guia paso a paso con botones interactivos.
Flag
(post/perfil modificado via CSRF)
Remediacion
- Tokens anti-CSRF en formularios
- SameSite=Strict en cookies
- Verificar Origin/Referer headers