Skip to content
Business logic Write-up Beginner

Ghost Codes: How Deleted Accounts Keep Paying Rewards

Referral codes stayed active after the account that owned them was deleted, so a new account could redeem a deleted user's code and still receive the 100 CHF sign-up reward. An attacker could repeat this to collect rewards with no legitimate referrer behind them.

medium.com

Published on medium.com

read this writeup first on the same application with the same features : https://medium.com/@0xMo7areb/a-critical-referral-logic-flaw-enabling-unlimited-financial-exposure-44dd753e0269

0xMo7areb 🥷, 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 account deletion did not deactivate or cascade to the referral code, and reward issuance never checked that the code belonged to an active account.

Impact

Rewards could be granted without a legitimate referrer, causing financial loss and letting orphaned codes be reused, though the text gives no evidence of large-scale exploitation.

What the attacker needed

Ability to create and delete accounts; ability to sign up new accounts

The fix

Referral codes should be deactivated when an account is deleted, and every code should be checked against an active account before a reward is paid.

How it was found

  1. Create an account and obtain its referral code.
  2. Delete that account.
  3. Sign up a new account and redeem the old code.
  4. Observe that the new user still receives the 100 CHF reward.

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.

Many apps give you a personal code to share; when a friend signs up with it, both of you get a bonus. Here, deleting your account removed your profile but left your code working, so anyone could still use it and get the bonus even though the person who owned it was gone. That means free money could be claimed again and again without a real referrer.

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.

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.