Race Condition on "Get free Badoo Premium" which allows to get more days of free premium for Free.
A race condition in the endpoint that grants a free three-day premium trial allowed multiple simultaneous requests to each add three days, so an attacker could obtain more than the intended three days of free premium.
- Triaged in 4 hours
- Fixed in 15 days
- Paid in 15 days
- Disclosed after 19 days
##Summary:
On Badoo when a user wants to delete his account it prompts for a Free 3 days premium or the user can proceed to delete his account. But when user choose to get free 3 day premium he can click Get free Badoo Premium and can enjoy free premium for three days, Here i found a race condition vulnerability through which i was able to get more than three days of premium.
On the time of testing I got 3 successful request which got me 9 days of premium instead of 3 (where 1 week of premium costs about 5$) . And by increasing Number of connections an attacker can get even more days of premium. █████
POC Video:
█████████
##Steps To Reproduce:
-
Create a account on badoo.com
-
Go to badoo.com/settings and click
Delete accountwhich is available on bottom > Delete your account > I’m looking for something different > I don't want to pay, After these steps you'll see this prompt. ██████████ -
Before clicking
Get free Badoo Premiumturn intercept On in your burp suite and then clickGet free Badoo Premiumintercept thisPOST /webapi.phtml?SERVER_PROMO_ACCEPTEDselect any parameter value > right click > send it to turbo inturer. -
Copy this script from this link https://raw.githubusercontent.com/PortSwigger/turbo-intruder/master/resources/examples/race.py and paste it in code section of turbo intruder and click attack and after completion you'll see more than 1 sucessfull responses .
After seeing 3 successful █████ requests i conformed from the settings that it was successful where it showed it will stop on 27 November 2020 9 days from today 18 November
████████
##Vulnerable HTTP Request:
POST /webapi.phtml?SERVER_PROMO_ACCEPTED HTTP/1.1
Host: eu1.badoo.com
Connection: close
Content-Length: 190
X-Session-id: s1:77:████
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
X-Message-type: 402
X-User-id: █████████
Content-Type: json
Accept: */*
Origin: https://eu1.badoo.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://eu1.badoo.com/settings
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: {cookie here}
{"$gpb":"badoo.bma.BadooMessage","body":[{"message_type":402,"p_string":{"value":"delete_account_trial_spp_new_flow"}}],"message_id":101,"message_type":402,"version":1,"is_background":false}
##Supporting Material/References:
Impact
- As an attacker i can get Free premium access for more days without paying any money.
Context
Badoo, part of the Bumble programme on HackerOne, offers users who want to delete their account a choice: they can either proceed with deletion or accept a free three-day Premium trial. The prompt is part of the account deletion flow.
The endpoint that grants the trial is a single POST to webapi.phtml with the SERVER_PROMO_ACCEPTED query parameter. The researcher found that this endpoint could be hit many times concurrently, and each successful hit added another three days of Premium. The report is titled "Race Condition on 'Get free Badoo Premium' which allows to get more days of free premium for Free" and was disclosed on 7 December 2020 with a low severity (CVSS 2.6).
Setup
- A normal account on
badoo.com. - Burp Suite with the intercept proxy enabled.
- The Turbo Intruder extension for Burp, using the race script published by PortSwigger.
- No special role or privilege was needed; the flow is available to any user who starts deleting their account.
Finding it
The deletion flow asks the user to confirm. Instead of deleting immediately, it offers a free three-day Premium period.
Exploitation
Step 1: Create an account
Register a normal account on badoo.com.
Step 2: Reach the deletion prompt
- Go to
badoo.com/settings. - Click
Delete account, available at the bottom of the page. - Choose
Delete your account. - Choose
I'm looking for something different. - Choose
I don't want to pay.
After these steps the prompt offering the free three-day Premium appears.
Step 3: Intercept the grant request
Turn intercept on in Burp Suite before clicking Get free Badoo Premium, then click the button. Burp captures a request of the form:
POST /webapi.phtml?SERVER_PROMO_ACCEPTED HTTP/1.1
Select any parameter value, right click, and send the request to Turbo Intruder.
Step 4: Send the request in parallel
The researcher used the race script from the Turbo Intruder examples:
https://raw.githubusercontent.com/PortSwigger/turbo-intruder/master/resources/examples/race.py
That script is pasted into the code section of Turbo Intruder, and the attack is started. When it finishes, more than one successful response is returned.
The vulnerable request
The full captured request, as published in the report (with the session identifier and user identifier redacted here), is:
POST /webapi.phtml?SERVER_PROMO_ACCEPTED HTTP/1.1
Host: eu1.badoo.com
Connection: close
Content-Length: 190
X-Session-id: s1:77:[redacted]
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
X-Message-type: 402
X-User-id: [redacted]
Content-Type: json
Accept: */*
Origin: https://eu1.badoo.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://eu1.badoo.com/settings
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: {cookie here}
{"$gpb":"badoo.bma.BadooMessage","body":[{"message_type":402,"p_string":{"value":"delete_account_trial_spp_new_flow"}}],"message_id":101,"message_type":402,"version":1,"is_background":false}
The important parts:
X-Session-idandX-User-ididentify the account; the session cookie is also sent.message_id: 101andversion: 1are part of the message envelope.
Result
On the test run, three requests succeeded, which produced nine days of Premium instead of three. The researcher notes that one week of Premium costs about 5 USD. Increasing the number of connections would, in the researcher's words, let an attacker get even more days of Premium.
The success was confirmed in the account settings, which showed the Premium would stop on 27 November 2020, nine days after the test date of 18 November.
Root cause
The report does not describe the server-side implementation, so the exact check and storage are not shown; the behaviour is consistent with a missing atomic guard or unique constraint around the grant.
Impact
An attacker can obtain free Premium access for more days than the offer allows, without paying. The report frames this as the attacker getting more days of free premium for free. The researcher's own test produced nine days from three successful requests; more connections would yield more days. The report does not describe any effect on other users or on data beyond the attacker's own account.
Fix
Variants to test
- Other one-off grants. Look for endpoints that grant a trial, credit, coupon or bonus once per account, and send the acceptance request in parallel with Turbo Intruder. A positive result is more than one successful response and a balance or expiry date that reflects more than one grant.
- Promo and referral codes. Submit the same code concurrently. A positive result is the code being redeemed more than once on the same account.
- Account state changes. Try parallel requests for actions that should happen once, such as accepting terms or completing onboarding. A positive result is duplicate side effects, such as repeated credits or repeated notifications.
- Different connection counts. Repeat the race with increasing numbers of connections to see whether the number of successful grants scales. A positive result is a higher count of successful responses as connections increase.
What happened, in plain words
Badoo is a dating app. It has a paid tier called Premium. When you try to delete your Badoo account, the site tries to keep you: instead of deleting straight away, it offers you three days of Premium for free. You either take the free days or carry on deleting.
The researcher found that sending the request many times at almost the same instant could grant more than three days. In the test, three presses that all went through at once gave nine days of Premium instead of three. One week of Premium costs about 5 USD, so this is free paid time.
The kind of bug is called a race condition.
The report was published on HackerOne, the bug bounty platform, under the Bumble programme (Bumble owns Badoo). It was disclosed on 7 December 2020 and rated low severity, CVSS 2.6.
The pieces you need to understand first
Before the steps, a few everyday ideas:
- A request and a response. Your browser asks a website for something (a request) and the website answers (a response). Every click on a button is usually one request.
- An API endpoint. A web page is what you see; an API is the behind-the-scenes door the page uses to talk to the server. An endpoint is one specific door, identified by a URL and often by extra text after a question mark. Here the door is
webapi.phtmland the extra text isSERVER_PROMO_ACCEPTED. - A cookie and a session id. When you log in, the server gives your browser a small piece of text called a cookie, and a session id is a label that ties that cookie to your account. It is like a wristband at an event: show it and staff know who you are without asking for your password every time. Anyone who steals it can pretend to be you, which is why it is hidden in this write-up.
- A header. Extra lines sent alongside a request, like the label on a parcel: who it is from, what type of content it holds, which page it came from.
- JSON. A simple text format for structured data, using curly braces and quotes. Servers use it to send and receive details.
- Burp Suite. A tool that sits between your browser and the website so you can look at, pause and change requests. Its intercept mode pauses each request before it leaves, so you can inspect it.
- Turbo Intruder. An add-on for Burp that can fire many copies of the same request at the same moment, which is exactly what a race condition needs. Ordinary clicking sends requests one at a time, too slowly to overlap.
Setting up
- A normal account on
badoo.com. No special role or permission was needed; any user who starts deleting their account sees the offer. - Burp Suite with its intercept proxy switched on.
- The Turbo Intruder extension for Burp, loaded with the race script that PortSwigger publishes.
Finding it
When you start deleting your account, Badoo asks you to confirm. Before deleting, it offers three free days of Premium.
Exploitation, step by step
Step 1: Create an account
Register a normal account on badoo.com. This is your own test account; the whole flow only affects the account you are logged into.
Step 2: Reach the deletion prompt
- Go to
badoo.com/settings. - Click
Delete account, which sits at the bottom of the page. - Choose
Delete your account. - Choose
I'm looking for something different. - Choose
I don't want to pay.
After these steps the prompt offering the free three-day Premium appears.
Step 3: Intercept the grant request
Turn intercept on in Burp Suite before clicking Get free Badoo Premium, then click the button. Burp pauses the request so you can see it. It looks like this:
POST /webapi.phtml?SERVER_PROMO_ACCEPTED HTTP/1.1
This line says: send a POST (a request that changes something on the server) to the endpoint webapi.phtml, with the parameter SERVER_PROMO_ACCEPTED in the URL.
Select any parameter value, right click, and send the request to Turbo Intruder. You are moving the captured request into the tool that can replay it many times at once.
Step 4: Send the request in parallel
The researcher used the race script from the Turbo Intruder examples:
https://raw.githubusercontent.com/PortSwigger/turbo-intruder/master/resources/examples/race.py
That script is pasted into the code section of Turbo Intruder, and the attack is started. When the attack finishes, more than one successful response comes back.
The vulnerable request
The full captured request, as published in the report (with the session identifier and user identifier hidden here), is:
POST /webapi.phtml?SERVER_PROMO_ACCEPTED HTTP/1.1
Host: eu1.badoo.com
Connection: close
Content-Length: 190
X-Session-id: s1:77:[redacted]
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
X-Message-type: 402
X-User-id: [redacted]
Content-Type: json
Accept: */*
Origin: https://eu1.badoo.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://eu1.badoo.com/settings
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: {cookie here}
{"$gpb":"badoo.bma.BadooMessage","body":[{"message_type":402,"p_string":{"value":"delete_account_trial_spp_new_flow"}}],"message_id":101,"message_type":402,"version":1,"is_background":false}
Line by line, in plain words:
POST /webapi.phtml?SERVER_PROMO_ACCEPTED HTTP/1.1is the request line: the action (POST), the endpoint, and the version of the web protocol.Host: eu1.badoo.comsays which server the request is for.Connection: closeasks the server to close the connection after answering.Content-Length: 190says how many bytes of body follow.X-Session-id: s1:77:[redacted]is the session label that ties the request to your logged-in account. It is hidden because anyone holding it could act as you.User-Agent: ...identifies the browser that made the request.X-User-id: [redacted]is your account number, also hidden.Content-Type: jsonsays the body is in JSON format.Accept: */*says the client accepts any kind of answer.Origin: https://eu1.badoo.comandReferer: https://eu1.badoo.com/settingssay where the request came from.Sec-Fetch-Site,Sec-Fetch-Mode,Sec-Fetch-Destare hints the browser adds about the kind of request.Accept-EncodingandAccept-Languagesay how the client would like the answer compressed and in which language.Cookie: {cookie here}is where your login cookie goes; it is left as a placeholder in the report.- The JSON body names the message type (
402), the specific trial flow (delete_account_trial_spp_new_flow), and envelope details (message_id: 101,version: 1).
Result
On the test run, three requests succeeded, which produced nine days of Premium instead of three. The researcher notes that one week of Premium costs about 5 USD. Increasing the number of connections would, in the researcher's words, let an attacker get even more days of Premium.
The success was confirmed in the account settings, which showed the Premium would stop on 27 November 2020, nine days after the test date of 18 November.
Why it works
The report does not describe the server-side implementation, so the exact check and storage are not shown; the behaviour is consistent with a missing atomic guard or unique constraint around the grant.
Impact
An attacker can obtain free Premium access for more days than the offer allows, without paying. The report frames this as the attacker getting more days of free premium for free. The researcher's own test produced nine days from three successful requests; more connections would yield more days. The report does not describe any effect on other users or on data beyond the attacker's own account.
Fix
Variants to test
- Other one-off grants. Look for endpoints that grant a trial, credit, coupon or bonus once per account, and send the acceptance request in parallel with Turbo Intruder. A positive result is more than one successful response and a balance or expiry date that reflects more than one grant.
- Promo and referral codes. Submit the same code concurrently. A positive result is the code being redeemed more than once on the same account.
- Account state changes. Try parallel requests for actions that should happen once, such as accepting terms or completing onboarding. A positive result is duplicate side effects, such as repeated credits or repeated notifications.
- Different connection counts. Repeat the race with increasing numbers of connections to see whether the number of successful grants scales. A positive result is a higher count of successful responses as connections increase.
Glossary
- API: the behind-the-scenes set of doors a website uses to talk to its server, separate from the pages you see.
- Endpoint: one specific API door, identified by a URL and often extra text after a question mark.
- Request: a message your browser sends to a server asking it to do something.
- Response: the server's answer to a request.
- POST: a request type used when something on the server should change, such as accepting an offer.
- Header: an extra line of information sent with a request, like a label on a parcel.
- Cookie: a small piece of text your browser stores after logging in, used to recognise you.
- Session id: a label that ties a cookie to your logged-in account.
- Burp Suite: a tool that sits between your browser and a website so you can inspect and change requests.
- Intercept: a Burp mode that pauses each request before it leaves, so you can look at it.
- Turbo Intruder: a Burp add-on that sends many copies of a request at the same moment.
- Race condition: a bug where several actions happening at almost the same time are each processed before any of them records that the action was already done.
- Atomic: done as a single indivisible step, so nothing can slip in between the check and the write.
- Unique constraint: a database rule that refuses a second record with the same key, such as a second trial for the same account.
- CVSS: a standard score for how serious a security bug is; higher means worse.
- HackerOne: a platform where researchers report bugs to companies and companies can pay bounties.
- Bug bounty programme: a scheme where a company invites researchers to find and report bugs, often for a reward.
- Severity: a rating of how much harm a bug could cause.
- Premium: Badoo's paid tier that unlocks extra features.
- Trial: a short free period of a paid feature, offered once per account.
- Redacted: hidden or replaced with a placeholder, usually to protect secrets or personal data.