Path Traversal via Invoice Download
Foro con sistema de pedidos donde el parametro file del endpoint de descarga de facturas permite path traversal para leer archivos arbitrarios del servidor.
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.
Despliegue
# Opcion 1: autodeploy
./autodeploy.sh
# Opcion 2: manual
docker compose up --build
# Acceder
http://localhost:1400
Compatible con macOS, Linux y Windows (Docker Desktop / WSL).
Para parar:
./autodeploy.sh destroy
# o: docker compose down -v
Contenido del Lab
La aplicacion
ZeroDay Forum con sistema de pedidos y descarga de facturas.
La vulnerabilidad
El endpoint /api/orders/download?file=invoice.pdf no sanitiza el parametro file, permitiendo ?file=../../../../etc/passwd para leer archivos arbitrarios.
Cadena de ataque
1. Hacer un pedido y descargar factura
2. Observar URL: /api/orders/download?file=invoice_123.pdf
3. Cambiar a: ?file=../../../../etc/passwd
4. Obtener contenido del archivo del sistema
Solucion interactiva
Accede a /writeup dentro de la aplicacion para una guia paso a paso con botones interactivos.
Flag
(contenido de /etc/passwd o archivos del servidor)
Remediacion
- Usar path.basename() para sanitizar el nombre de archivo
- Verificar que la ruta final esta dentro del directorio de facturas
- Usar IDs de base de datos en vez de nombres de archivo
- Bloquear secuencias ../ en los parametros
