At a glance
- Controls
- CWE-837
What it is
Referral programmes pay a reward to the person who invites and often to the new user too. The product checks only that the invite link was used and the new account exists. It never asks whether both accounts belong to the same person.
A user creates a second account with a new email, refers it, and collects both rewards. Scripts repeat this many times and drain the budget. AI-assisted attackers automate account creation and vary names, devices and addresses so each account looks distinct.
Where it hides
What a reviewer can look for in the code and in the behaviour, before anyone proves it.
- Referral code redemption at signup
- Reward release triggered by a first order, top-up or deposit
- Promo and credit endpoints that trust a referrer id sent by the client
- Rewards paid out before verification or fraud checks finish
How MATT tests it
The proof runs against the deployed product, on every release, whoever wrote the code.
- 01Read the referral code to see which checks run before a reward is paid.
- 02Refer a second MATT test account from a first one, using the same device and payment details.
- 03Record whether both rewards are granted, then remove the test accounts and any credit.
A referral reward must be paid only between distinct, verified people.
Executable checkas test user A: create invite link as test user A2 on the same device and card: sign up with A's link expect: no reward to either account, or the reward held for review expect: a referrer id sent by the client is ignored
Every rule MATT holds →What the fix looks like
- 01
Release rewards only after both people pass verification, such as a confirmed phone number.
- 02
Block or hold rewards when accounts share a device, payment method or address.
- 03
Decide the referrer on the server from the invite record and ignore client‑supplied ids.
- 04
Cap rewards per referrer and review unusual bursts.
A check that was never written is found by proving the deployed behaviour, fixed with the engineer who shipped it, and kept fixed by running the control on every change. What is ExploitOps? →