Skip to content
Race condition Write-up Intermediate

How I Used a Race Condition to Get Unlimited Subscriptions from One Voucher on Shahid.net️

A race condition in the voucher activation endpoint allowed the same single-use voucher code to be redeemed simultaneously by two different accounts, granting both premium subscriptions. An attacker could exploit this to obtain unlimited subscriptions from one paid voucher.

Hamzawy | 0xMo3Gza Follow

Published on medium.com

Hey there! I’m Hamza Ahmed Youssef, a 16-year-old bug hunter and security enthusiast known as 0xMo3Gza in the hacking world.

Hamzawy | 0xMo3Gza, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the server performed the voucher validity check and the activation as separate steps without proper locking or atomicity, allowing two concurrent requests to both pass the check before either marked the voucher as used.

Impact

An attacker could redeem a single voucher code across multiple accounts, potentially obtaining unlimited premium subscriptions without additional payment.

What the attacker needed

A valid single-use voucher code; two or more accounts; ability to intercept and modify requests

How it was found

  1. Purchase a single-use voucher code.
  2. Open two separate authenticated accounts and go to the code redemption portal.
  3. Enter the same voucher code on both accounts and click Verify.
  4. Intercept the activation request for both accounts.
  5. Send both activation requests in parallel using a single-packet attack.
  6. Observe both accounts receive a successful activation and the same subscription.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A race condition happens when a system checks something (like whether a voucher is unused) and then acts on it, but if two requests arrive at almost the same time, both can pass the check before either updates the record. Here, two accounts sent the same voucher code at the exact same moment, and the server gave both a subscription instead of rejecting the second. This means one paid code could be used many times if an attacker automates it.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More by Hamzawy | 0xMo3Gza

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.