EntornosRankingComunidadWriteupsPreciosGorka
Entrar
  1. Home
  2. Environments
  3. Web Cache Deception & BAC in /uploads

Web Cache Deception & BAC in /uploads

HardOriginalWith flag

E-commerce ficticio que encadena dos fallos: una SPA en React que decide el rol del usuario leyendo `GET /api/auth/me` (CWE-602), y un middleware de cache propio que normaliza la query string (strip de `utm_*`, `ref`, `cb`, `_`, `t`), no varía sobre `Authorization`/`Cookie`, e ignora `Cache-Control: private, no-store` (CWE-524). Un bot interno de soporte (Puppeteer-core) navega URLs same-origin con cookies de admin, lo que permite sembrar el cache con la respuesta privilegiada y leerla anónimamente. Objective: capture the flag.

Auth BypassBAC
Log in to startSee the environment

1,071 views · 21 completed · updated Nov 2026

Access

Learn to find this bug

An environment built to train this technique, step by step.

Create your account and practise with real hacks. Download the environment, find the bug and learn the exact technique.

hunters training

hacking environments

environments solved

paid out for these bugs

Create account
I already have an account

Access to all environments · cancel the renewal anytime and keep what you paid for

Information

Difficulty
Hard
Duration
1h
Bounty
Not applicable
Completed
21
Creator
@gorka
Updated
Nov 2026

The environment

ZIP with the environment and its autodeploy

You download it from here. Inside there's the environment and two scripts that start it for you, one per system.

autodeploy.shautodeploy.ps1
Create an account to download it

Only requirement: Docker

Nothing else. The autodeploy builds and starts the environment for you.

Autodeploy · one command

Linux and macOS

$./autodeploy.sh

Windows

PS>.\autodeploy.ps1

From inside the folder the ZIP creates. It prints the URL and credentials.

Explainer video · by @gorka

Objectives · the path, not the solution

  1. 01Identificar que la SPA decide el rol UI
  2. 02Descubrir desde el panel admin (renderizado tras el bypass) la URL del recurso sensible
  3. 03nalizar las cabeceras `X-Cache` y `X-Cache-Key` para mapear cómo el normalizador del cache
  4. 04Localizar el gadget same-origin: el formulario `/support` con el campo `screenshot_url`
  5. 05Encadenar el ataque enviando un ticket cuyo `screenshot_url` apunte a....
  6. 06Extraer la flag del PDF filtrado

Prerequisites

  • Conocimiento de HTTP caching
  • Soltura con Burp Suite
  • Familiaridad con SPAs en React

Tools

  • Burp Suite
  • Navegador

Latest to solve it

  • @sharat chandraOct 2026
  • @bizedtvSep 2026
  • CR@crashSep 2026
  • @benjaminnocervigniJul 2026
  • @flyingwhalesJul 2026
  • @kanekiJul 2026
  • XL@xl4nJul 2026
  • AL@alex.burja.2000Jul 2026

The badge

Achievement you'll earn

Solve this environment to unlock this shareable achievement

Solve this environment 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.

Lumora Market es un mini e-commerce (Express + TypeScript + better-sqlite3 + React 18 + Vite + Puppeteer-core, puerto 2300) diseñado como playground para una cadena de dos vulnerabilidades reales:

  • Capa 1 — Confianza ciega del cliente en la respuesta del servidor (CWE-602). La SPA hace GET /api/auth/me al cargar y persiste el role devuelto. El navbar y el routing del panel /admin se renderizan solo a partir de ese campo. Una regla de Burp que reescriba "role":"user" → "role":"admin" en la respuesta hace aparecer la UI de admin con la lista de "Internal Reports", incluyendo la URL /internal/credentials-report.pdf. Al pedirla directamente, el middleware requireAdmin del backend devuelve 403 — esa puerta es honesta. El bypass solo sirve como recon: revela el nombre del recurso sensible.

  • Capa 2 — Web Cache Deception por normalización de la cache key (CWE-524). El middleware de cache propio (server/src/middleware/cache.ts) tiene tres defectos combinados: (a) reescribe la query string eliminando utm_*, ref, cb, _, t antes de calcular la key, (b) no incluye Authorization ni Cookie en la key (no hay vary por identidad), y (c) almacena toda respuesta 2xx durante 60 s ignorando Cache-Control: private, no-store que pone el origen. Resultado: dos URLs vistas como distintas por el origen (porque la cookie del bot autentica al admin) terminan en la misma bucket que la URL "limpia" anónima.

  • Gadget — el bot de soporte. El formulario público /support admite un campo screenshot_url. El proceso server/src/bot/supportBot.ts (Puppeteer-core) hace login como admin con credenciales aleatorias por boot, polling de tickets status=new, lanza Chromium, setea lm_token=<JWT admin> como cookie en localhost, y hace page.goto(screenshot_url, { waitUntil: 'domcontentloaded' }). Rechaza orígenes que no sean los del propio lab (localhost:2300, 127.0.0.1:2300, lumora:2300), por lo que no es un SSRF clásico — pero sí un primitivo perfecto para envenenar el cache con la respuesta privilegiada del propio sitio.

La cadena completa:

  1. Login como attacker@lumora.market / password123.
  2. Burp Match & Replace sobre body de respuesta: "role":"user" → "role":"admin".
  3. Recargar SPA → aparece /admin con la URL /internal/credentials-report.pdf.
  4. Confirmar normalización con curl -i 'http://localhost:2300/internal/credentials-report.pdf?cb=test' y ver que X-Cache-Key: /internal/credentials-report.pdf (sin la query).
  5. Abrir /support y enviar un ticket con screenshot_url: http://localhost:2300/internal/credentials-report.pdf?cb=poison.
  6. Esperar ~10 s (ciclo de polling del bot). El bot navega la URL → el origen sirve el PDF al admin con Cache-Control: private, no-store → el middleware lo guarda igual bajo la key normalizada.
  7. Anónimamente: curl -i http://localhost:2300/internal/credentials-report.pdf -o leaked.pdf → X-Cache: HIT, 200 OK.
  8. pdftotext leaked.pdf - | grep -oE 'FLAG\{[a-f0-9]{32}\}' → flag.

Por qué encaja en la familia "Web Cache Deception". El paper original de Omer Gil (2017) abusa de un CDN que cachea por extensión /account.php/foo.css mientras el origen ignora la parte cosmética y devuelve la página sensible. Aquí el twist es el mismo en otra dirección: dos URLs (...?cb=poison y ...) son distintas para el origen (autenticación + branching) pero iguales para el cache (la query se descarta antes de keyear). Una víctima privilegiada visita la "ruidosa" y la víctima anónima cosecha la "limpia".

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 Discord

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

Aprende hacking con entornos que replican hackeos reales.

Producto

  • Entornos
  • Hacker Roadmap
  • Arena · ranking
  • Precios
  • Empresas

Aprender

  • Aprender desde 0
  • Academy
  • Blog
  • Writeups
  • Crew · Discord

Más

  • Gorka
  • Términos
  • Privacidad
  • Cookies
  • team@bblabs.es
© 2026 BBLABS · Hecho en Españalabs.bblabs.escrew.bblabs.esacademy.bblabs.esarena.bblabs.esblog.bblabs.esbugbounty.bblabs.esteams.bblabs.es