BBLABSBBLABS
LaboratoriosAprender desde 0FuncionesPreciosTestimoniosDetrás de BBLABS
  1. Home
  2. Labs
  3. Stored XSS via SVG File Upload
Medium15 min

Stored XSS via SVG File Upload

By @gorka

Red social donde se pueden subir archivos SVG como avatares. Los SVGs se renderizan con etiquetas <object> que permiten la ejecucion de JavaScript embebido.

$750

That's what a company paid for this bug on HackerOne. Here it is, rebuilt for you to find it yourself.

1.6K views49 completedUpdated Nov 2026
Log in to start

Learn to find this bug

This bug paid $750 on HackerOne.

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
lydiel2
@lydiel22 days ago
espejoramirezhugo3
@espejoramirezhugo24 days ago
gh0stn4m3sec
@gh0stn4m3secSep 2026
sharat chandra
@sharat chandraSep 2026
jose.medac
@jose.medacSep 2026
zuk4r1
@zuk4r1Sep 2026
emperador
@emperadorSep 2026

Objectives

1
Subir un archivo SVG como avatar
2
Observar que se renderiza con <object> (no <img>)
3
Crear un SVG con JavaScript embebido
4
Verificar ejecucion de XSS

Information

Platform
HackerOne
Difficulty
Medium
Duration
15 min
Bounty
$750
Completed
49
Creator
gorka@gorka
Collaborators
antoniorivera@antoniorivera
Updated
Nov 2026

Download the environment

Reproduce it and find the bug yourself

Create account

Tools

Editor de textoNavegador

Prerequisites

  • SVG basico
  • XSS via SVG
  • Diferencia entre <img> y <object>

Tags

XSS

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.

Despliegue

# Opcion 1: autodeploy
./autodeploy.sh

# Opcion 2: manual
docker compose up --build

# Acceder
http://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 con subida de avatares SVG renderizados con .

La vulnerabilidad

Los SVGs subidos se renderizan con <object> que ejecuta JavaScript embebido en el SVG (a diferencia de <img> que es seguro). Un SVG con <script>alert(1)</script> o onload=alert(1) se ejecuta.

Cadena de ataque

1. Crear SVG: <svg xmlns=...><script>alert(1)</script></svg>
2. Subir como avatar
3. Cualquier usuario que vea el perfil → XSS ejecutado

Solucion interactiva

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


Flag

(XSS ejecutado via SVG)

Remediacion

  1. Renderizar SVGs con en vez de
  2. Sanitizar SVGs (eliminar scripts y event handlers)
  3. CSP que bloquee inline scripts
  4. Servir SVGs con Content-Disposition: attachment

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.