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.
قَالُوا سُبْحَانَكَ لَا عِلْ� َ لَنَا إِلَّا � َا عَلَّ� ْتَنَا ۖ إِنَّكَ أَنتَ الْعَلِي� ُ الْحَكِي� ُ
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
- Navigate to the target site.
- Scroll to the newsletter signup form.
- Enter a valid email address.
- Click the sign up button.
- Check the inbox for a welcome email with a coupon code.
- 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.