BBLABSBBLABS
LaboratoriosAprender desde 0FuncionesPreciosTestimoniosDetrás de BBLABS
  1. Home
  2. Labs
  3. Path Traversal via Avatar Upload
Easy30 min

Path Traversal via Avatar Upload

By @gorka

Foro de seguridad donde el nombre de archivo del avatar se preserva sin sanitizar, permitiendo leer archivos del sistema como /etc/passwd via path traversal.

This hack was reported with no reward

1.2K views47 completedUpdated Nov 2026
Log in to start

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.

650

hunters training

50

labs from real hacks

380

completions

$12,000

paid out for these bugs

40 flags captured this week
Create account
I already have an account

Access to all labs · no commitment · cancel anytime

Hackers who solved it· 8

JM1
@overtone10 days ago
moidlahoz022
@moidlahoz0210 days ago
lydiel3
@lydiel22 days ago
espejoramirezhugo
@espejoramirezhugo24 days ago
gh0stn4m3sec
@gh0stn4m3secSep 2026
sharat chandra
@sharat chandraSep 2026
jose.medac
@jose.medacSep 2026
emperador
@emperadorSep 2026

Objectives

1
Subir un avatar y observar la URL resultante
2
Notar que el filename se preserva en el path
3
Manipular el filename con ../../
4
Leer /etc/passwd a traves de la URL del avatar

Information

Difficulty
Easy
Duration
30 min
Bounty
Sin recompensa
Completed
47
Creator
gorka@gorka
Updated
Nov 2026

Download the environment

Reproduce it and find the bug yourself

Create account

Tools

Burp SuiteCurl

Prerequisites

  • Path traversal basico (../)
  • Manipulacion de uploads

Tags

Path Traversal

Achievement you'll earn

Solve this lab to unlock this shareable achievement

Solve this lab to unlock this shareable achievement

Community writeups

Free · no account

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
(registrar cuenta propia) user

Despliegue

# Opcion 1: autodeploy
./autodeploy.sh

# Opcion 2: manual
docker compose up --build

# Acceder
http://localhost:1300

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 es un foro de seguridad informatica con perfiles de usuario y subida de avatares.

La vulnerabilidad

El endpoint de avatar preserva el filename del upload en la ruta del archivo sin sanitizar. GET /api/profile/avatar/:userId construye la ruta usando el filename almacenado, permitiendo traversal con ../../../../etc/passwd.

Cadena de ataque

1. Registrarse en el foro
2. Subir avatar con filename: ../../../../etc/passwd
3. Visitar /api/profile/avatar/:userId
4. Obtener contenido de /etc/passwd

Solucion interactiva

Accede a /writeup dentro de la aplicacion para una guia paso a paso con botones interactivos.


Flag

(contenido de /etc/passwd)

Remediacion

  1. Sanitizar filenames: eliminar ../ y caracteres especiales
  2. Usar path.basename() para extraer solo el nombre
  3. Almacenar archivos con nombres generados (UUID)
  4. Verificar que la ruta final esta dentro del directorio permitido

The community

This isn't a platform with users.It's people breaking the same things you are.

Inside people ask, share what they found and solve together what would block anyone on their own. It's free to join: no account, no plan, no email required.

Join the BBLABS community on Discord
Join the Discord

Free and open. You don't need a BBLABS account to join.

BBLABS LogoBBLABS

Laboratorios de hacking basados en hackeos reales. Aprende practicando sobre entornos vulnerables, con la resolución explicada paso a paso.

Producto

  • Funcionalidades
  • Precios
  • Labs
  • Aprender desde 0
  • Blog
  • Detrás de BBLABS

Legal

  • Términos
  • Privacidad
  • Cookies
  • Entrar
  • Crear cuenta

Para cualquier duda, bug, soporte o sugerencia puedes escribir a team@bblabs.es

© 2026 BBLABS. Todos los derechos reservados.