Mass Assignment Privilege Escalation
Plataforma de recetas de cocina donde el endpoint de registro acepta el campo 'role' sin validacion, permitiendo registrarse como administrador y acceder al panel con datos sensibles y la flag del sistema.
This hack was reported with no reward
Learn to find this bug
A real hack, 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
labs from real hacks
completions
paid out for these bugs
Access to all labs · no commitment · cancel anytime
Hackers who solved it· 8
Objectives
Achievement you'll earn
Solve this lab to unlock this shareable achievement

Community writeups
The checklist I run on every new target
47 checks ordered by cost: first what can get you in trouble, then the cheap stuff, and finally the expensive stuff — which is where the big bounties are. I'll send it to your inbox right now.
Unsubscribe in one click, from any email.
Credenciales
| Usuario | Contrasena | Rol |
|---|---|---|
| gordon | password123 | user |
| julia | password123 | user |
| marco | password123 | admin |
Despliegue
# Opcion 1: autodeploy
./autodeploy.sh
# Opcion 2: manual
docker compose up --build
# Acceder
https://localhost:1002
Compatible con macOS, Linux y Windows (Docker Desktop / WSL).
Para parar:
./autodeploy.sh destroy
# o: docker compose down -v
Contenido del Lab
La aplicacion
ChefHub es una plataforma social de recetas donde los usuarios comparten sus creaciones culinarias, exploran recetas de otros chefs, y los administradores gestionan el contenido y los usuarios.
La vulnerabilidad
El endpoint POST /api/auth/register acepta el campo role directamente del body JSON sin ningun filtrado. Aunque la interfaz web no envia este campo, un atacante puede anadirlo manualmente para obtener privilegios de admin.
Cadena de ataque
1. Registrarse normalmente → response muestra role: user
2. Intentar GET /api/admin/stats → 403 Forbidden
3. Registrar con {... , role: admin} → role: admin!
4. Login → Acceso completo al panel admin
5. Flag en /api/admin/stats
Solucion interactiva
Accede a /writeup dentro de la aplicacion para una guia paso a paso con botones interactivos.
