BBLABS v2BBLABSv2
>Home>Labs
>New labs

Latest 3 labs

Loading…

View all labs →
>Creators>Ranking
>Learn

Learn bug bounty

AcademyGuides, cheatsheets and glossaryVulnerabilitiesXSS, SQLi, IDOR, SSRF and moreHacker RoadmapYour step-by-step bug bounty pathBlogBug bounty guides and news
>Business>Pricing
ES
Log inLog in
>Home>Labs>New labs>Creators>Ranking>Learn>Business>Pricing
ES
Sign inCreate account
  1. Home
  2. Labs
  3. Race Condition in Coupon Application
MediumVDP25 min

Race Condition in Coupon Application

By @gorka

E-commerce donde el endpoint de aplicar cupon tiene un delay entre verificar si ya fue usado y aplicarlo, permitiendo aplicar el mismo cupon multiples veces con peticiones concurrentes hasta que el precio llegue a 0.

1.2K views21 completedUpdated Sep 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

blackcloudsecurity1
@blackcloudsecurity23 days ago
alumnofing312
@alumnofing3124 days ago
danielmijan113
@danielmijan1125 days ago
telecasacasa45
@telecasacasa45Aug 2026
VA
@vazquezdv182005Aug 2026
flyingwhales
@flyingwhalesJul 2026
kaneki
@kanekiJul 2026
r4mattra
@r4mattraJul 2026

Objectives

1
Crear un pedido y observar el flujo de cupones
2
Identificar el endpoint POST /api/orders/:id/apply-coupon
3
Enviar 20+ peticiones concurrentes para aplicar el mismo cupon
4
Verificar que el precio se redujo a 0

Information

Difficulty
Medium
Duration
25 min
Bounty
VDP
Completed
21
Creator
gorka@gorka
Updated
Sep 2026

Download the environment

Reproduce it and find the bug yourself

Create account

Tools

Burps Suite

Prerequisites

  • Concepto de Race Condition (TOCTOU)
  • Herramientas para peticiones concurrentes

Tags

Race Condition

Achievement you'll earn

Solve this lab to unlock this shareable achievement

BBLABS.ESLab Solved
MediumVDP
// achievement_unlocked

Race Condition in Coupon Application

Race Condition
Sep 2026
gorka
solved_by@gorkaMember since Mar 2026
bblabs.es// real hacking practice

Community writeups

Despliegue

# Opcion 1: autodeploy
./autodeploy.sh

# Opcion 2: manual
docker compose up --build

# Acceder
https://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

ShopZone es un e-commerce con cupones de descuento que se aplican a pedidos.

La vulnerabilidad

El endpoint verifica si el cupon ya fue aplicado, luego aplica el descuento con un delay artificial entre ambas operaciones. Peticiones concurrentes pasan la verificacion antes de que ninguna haya completado la aplicacion.

Cadena de ataque

1. Crear pedido (ej: 100 euros)
2. Obtener cupon de 20 euros
3. Lanzar 20+ peticiones concurrentes de aplicar cupon
4. Todas pasan el check al mismo tiempo
5. Cupon aplicado multiples veces\n6. Precio final: 0 euros

Solucion interactiva

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


Flag

(precio del pedido reducido a 0 euros)

Remediacion

  1. Usar transacciones atomicas en la base de datos
  2. SELECT FOR UPDATE para bloquear la fila
  3. Optimistic locking con version numbers
  4. Rate limiting por usuario + recurso

Contact

Practice, learn and hack

Bug bounty practice platform with labs based on real hacks. Learn ethical hacking in safe environments.

contact→

Follow us

YouTube
@0xGorka
X
@gorkaelbochi
LinkedIn
gorka-el-bochi-morillo
Instagram
@_.gorkaaa.b
Email
team@bblabs.es

Access every lab from €7.99/mo

New labs every week. Cancel anytime.

Create account

BBLabs is the bug bounty labs platform where you learn bug bounty with real vulnerabilities extracted from paid hacks on HackerOne, YesWeHack and Bugcrowd. Here you practice web hacking —XSS, SQLi, IDOR, SSRF, CSRF and more— in downloadable environments, capture the flag, read the writeup and apply the technique on active bug bounty programs.

BBLabs is the alternative to HackTheBox, TryHackMe and PentesterLab for those who want to practice bug bounty with real hacks instead of artificial CTFs. From €7.99/mo, no commitment.

→ Learn bug bounty from scratch→ How to do bug bounty step by step→ Real bug bounty reports→ BBLabs for companies and academiesLabsAcademyVulnerabilitiesToolsHacker rankingXSS labsIDOR labsSSRF labsCSRF labsHackTheBox alternativeHack4u alternativeTryHackMe alternativePortSwigger alternativePentesterLab alternativeBug Bounty Labs comparisonHackerOne to practiceOffSec / OSCP alternativeINE / eWPT alternativeHTB Academy alternativeDVWA alternativeJuice Shop alternativeVulnHub alternativePentesterAcademy alternativeRoot-Me alternativeHackTheBox vs TryHackMeBest bug bounty platforms 2026BlogSpoilersWhat is bug bounty?How much do you earn in bug bounty?OWASP Top 10 explainedBest sites to practice web hackingHow to become an ethical hacker from scratchBurp Suite tutorial (Spanish)OSCP guide and prepGoogle Dorks for bug bountyHow much an ethical hacker earns in SpainBug bounty tools 2026Best cybersecurity certifications 2026Burp Suite tutorialsqlmap tutorialffuf web fuzzingnuclei tutorialHTTP Request SmugglingWAF bypassPrompt injection (LLM)Google Dorks
Made withand code
TermsPrivacyCookiesComparisonES

© 2026 BBLABS v2 — All rights reserved