Race Condition : Exploiting the loyalty claim https://xxx.vendhq.com/loyalty/claim/email/xxxxx url and gain x amount of loyalty bonus/cash
A race condition in the loyalty claim endpoint allowed a first-time customer to submit the claim multiple times concurrently, receiving multiple loyalty bonuses instead of one. An attacker could thereby gain extra loyalty credit that could be used as payment.
- Triaged in 18 hours
- Fixed in 25 days
- Disclosed after 2 months
Hey Team! I love loyalty bonuses, that turns first time users into returning customers , but sometimes loyalty can be exploited, just like in this chase.
LT:DR
A firtstime loyalty customer will get x times the amount of loyalty bonus from the story by racing the loyalty link x amount of times in one go.
https://stokhackerone.vendhq.com/loyalty/claim/XXXXXX
See POC video for full Walkthrough
POC:
- Create a store
- Enable the loyalty program
- Make a sale
- Add the first time customers email adress
- open up loyalty email
- submit the post 1,2,30,50 times depending on how mutch loyalty you want to receive
- enjoy your loyalty.
I tried it a couple times with two unique users, sometimes its a 100% race, ie 50 times 100 = 5000, sometimes its a little lower, depends on load and latency. i only tried it twice to be sure not to DOS.
Once again, finally, thanks got having an awesome product, it saves so mutch time for SMB's!
Stay epic!
//f
Impact
An attacker could race the loyalty claim post to get x amount of loyalty bonus and if the site has enabled the ecom version, and then use that cash as a loyalty
##How do customers redeem their loyalty https://support.vendhq.com/hc/en-us/articles/201382810-Setting-Up-and-Using-Loyalty-in-Vend#redeem
When a customer wants to pay for a sale with their loyalty balance, it's simple and easy for your staff.
Just add the items to the sale, add the customer to the sale, and click 'Pay'. Customers can pay:
All of the sale with loyalty Part of sale with loyalty
To pay the entire sale with loyalty, simply choose the loyalty payment type. This will be greyed out if the customer does not have enough loyalty to pay for the whole sale.
To pay part of a sale with loyalty, type the amount to be paid by loyalty into the total field. This must be equal to, or less than, the total loyalty the customer has. If it is, the loyalty payment button will now be available. Click the loyalty payment button. Then, pay the remainder of the sale off using another payment type.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server checked whether the loyalty claim had already been used and then applied the bonus without making those two steps atomic, so concurrent requests could all pass the check.
Impact
An attacker could race the loyalty claim to obtain multiple loyalty bonuses, which could then be used as payment if the ecommerce version is enabled.
What the attacker needed
A store with loyalty program enabled; a first-time customer email; ability to send concurrent requests
How it was found
- Create a store
- Enable the loyalty program
- Make a sale
- Add the first time customer's email address
- Open the loyalty email
- Submit the claim request multiple times concurrently
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 report has not been written yet. The Original tab links to the source.
When a customer clicks a loyalty bonus link, the server checks if they already claimed it and then adds the bonus. If many requests arrive at the same moment, the check may pass for all of them before any bonus is recorded, so the bonus is added several times. This is called a race condition.
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.