SSRF via HTML Injection in PDF Generation
Plataforma de archivos donde la generacion de facturas PDF usa Puppeteer para renderizar HTML. El campo de direccion acepta HTML raw, permitiendo inyectar un iframe al servicio de admin interno.
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
SSRF via HTML Injection in PDF Generation
Community writeups
Despliegue
# Opcion 1: autodeploy
./autodeploy.sh
# Opcion 2: manual
docker compose up --build
# Acceder
http://localhost:1200
Compatible con macOS, Linux y Windows (Docker Desktop / WSL).
Para parar:
./autodeploy.sh destroy
# o: docker compose down -v
Contenido del Lab
La aplicacion
FileForge con e-commerce, facturacion PDF (Puppeteer) y servicio de administracion interno en puerto 9999.
La vulnerabilidad
La factura PDF se genera con Puppeteer renderizando HTML. El campo de direccion del usuario se inserta como HTML raw (sin sanitizar). Inyectando <iframe src="http://127.0.0.1:9999"> se fuerza a Puppeteer a cargar el admin panel interno dentro del PDF.
Cadena de ataque
1. Registrarse y editar perfil
2. Poner como direccion: <iframe src=\"http://127.0.0.1:9999\" width=\"100%\" height=\"600\">
3. Comprar producto → generar factura
4. Descargar PDF → admin panel visible
5. Flag en el panel de administracion
Solucion interactiva
Accede a /writeup dentro de la aplicacion para una guia paso a paso con botones interactivos.
Flag
e10adc3949ba59abbe56e057f20f883e
Remediacion
- Sanitizar HTML en todos los campos antes de renderizar
- No usar Puppeteer para renderizar datos de usuario sin sanitizar
- Bloquear acceso a red interna desde el renderizador
- Usar templates con datos escapados