Skip to content
Business logic Write-up Beginner

Unlimited Coupon Code Generation for Same Email Address

The newsletter signup form generated a new unique 15% discount coupon for every submission, even when the same email address was used repeatedly. An attacker could automate signups to farm unlimited valid coupon codes, bypassing the intended one-time, first-order-only restriction.

RootXSec Follow

Published on medium.com

قَالُوا سُبْحَانَكَ لَا عِلْ� َ لَنَا إِلَّا � َا عَلَّ� ْتَنَا ۖ إِنَّكَ أَنتَ الْعَلِي� ُ الْحَكِي� ُ

Rootxsecurity, 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

The signup endpoint lacked any check for existing subscribers or previously issued coupons, and there was no rate limiting or anti-automation control.

Impact

An attacker could generate unlimited valid 15% discount codes for the same email, hoard or resell them, and cause repeated revenue loss by bypassing the first-order-only rule.

What the attacker needed

A valid email address; access to the signup form

The fix

The signup endpoint should check whether the email already exists and has received a coupon, bind each coupon to the email, and add rate limiting or CAPTCHA to prevent automation.

How it was found

  1. Navigate to the target site.
  2. Scroll to the newsletter signup form.
  3. Enter a valid email address.
  4. Click the sign up button.
  5. Check the inbox for a welcome email with a coupon code.
  6. Repeat the signup with the same email address and observe a new unique coupon each time.

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 website offered a one-time 15% off coupon to new newsletter subscribers. The site did not check if an email address had already received a coupon, so submitting the same email again and again produced a new valid code each time. This let someone collect many discount codes instead of just one.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by RootXSec

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.