CSRF Attack on (m.badoo.com)deleting account and erasing imported contacts
The mobile Badoo site accepted cross-site POST requests to delete an account and erase imported contacts without a CSRF token. An attacker could send a crafted HTML file to a logged-in victim, and when the victim clicked a submit button, the actions would be performed on their account.
Originally disclosed on HackerOne
- Triaged in 4 days
- Fixed in 19 days
- Paid in 19 days
- Disclosed after 51 days
Hello ,
##Summary :- I would like to report a Csrf bug that i found today that can cause deletion of any victim's account and also I was able to erase all imported contacts of victim on sub-domain--->m.badoo.com .
When attacker send a crafted malicious html file to victim and as soon as the victim opens the file and clicks on submit button(I m using submit button for demonstration purposes) , a delete POST request is made to m.badoo.com and the account of victim gets deleted. In a much similar way i was able to make an html file that when opened up by victim would erase victim's all imported contacts. (Note--->victim must possess an active session).
##Reproduction steps :-
Basically when i was capturing the request and response http headers in burpsuite , it basically caught my eye that there was no use of csrf token being implemented here, so I crafted two html files one for erasing imported contacts and another one for deleting accounts on m.badoo.com . Also , as the content-type was json so parser introduced "=" at the end of content in header, but it was bypassed by adding "ignore_me":"' value='test".
- Create 2 html files one for deletion and one for erasing contacts(both files have been attached)
2)send the html file to victim(victim should have an active session) 3)after clicking the submit button in both the html files , one will lead to deletion and other one erasing victim's contacts.
Below images describe the results :-
- results of deleting account --->

- results of erasing contacts --->

Attack Scenario and Patch :-
Attack scenario can be critical as an attacker would be able to delete and erase contacts of any person who has an account on m.badoo.com sub domain . Patch for the above scenario can be using CSRF token that must be random and keep on changing for every outgoing request to m.badoo.com
##Proof-Of-Concept:-
I have attached html files , image poc for the above attack scenario
Video PoC demonstration :- I have uploaded an unlisted video on youtube , here is a link :- https://youtu.be/rWm1RGXyK7I
regards tikoo_sahil
Context
The report concerns the subdomain m.badoo.com. Two account-management actions on that subdomain are the subject of this report: deleting the account, and erasing all imported contacts. Both are state-changing operations on that subdomain; the report describes a delete POST request and a JSON content type.
The report describes a Cross-Site Request Forgery (CSRF) issue: a page on an attacker-controlled origin can make the victim's browser send those POST requests to m.badoo.com, and the server acts on them because no CSRF token is used..
Setup
The attack requires the victim to have an active session on m.badoo.com. The only tool named in the report is Burp Suite, used to capture the request and response HTTP headers for the two actions. The precondition for the attack is stated explicitly: the victim must possess an active session on m.badoo.com when the crafted page is opened.
Two HTML files were produced, one for each action, and both are described as attached to the report. A video proof of concept was also recorded and uploaded as an unlisted YouTube video.
Finding it
While capturing the request and response headers for the two account-management actions in Burp Suite, the researcher noticed that no CSRF token was being used. That observation alone is the finding: the requests that delete an account and erase imported contacts carried nothing that a page on another origin could not supply.
One additional detail mattered for building the exploit. The requests use a JSON content type, and the researcher notes that because of this the parser introduced an = at the end of the content in the header. That behaviour was bypassed by adding the following value to the body:
"ignore_me":"' value='test".
In other words, the crafted body includes an extra JSON member whose value contains quote and equals characters, which the researcher says was enough to get past the parser behaviour caused by the JSON content type.
Exploitation
The attack is delivered as an HTML file. When the victim opens the file and clicks the submit button, the browser issues a POST request to m.badoo.com. The submit button is described as being there for demonstration purposes. The same pattern is used twice: once for account deletion and once for erasing imported contacts.
Step 1: Prepare the two HTML files
Create two HTML files, one for deletion and one for erasing contacts. Both are described as attached to the report. Each file is opened by the victim and has a submit button; the ignore_me value was used to bypass the parser behaviour.
Step 2: Deliver the file to the victim
The attacker sends the crafted HTML file to the victim. The victim must have an active session on m.badoo.com for the request to be accepted as that user.
Step 3: The victim opens the file and submits
As soon as the victim opens the file and clicks the submit button, a delete POST request is made to m.badoo.com and the victim's account is deleted. The same flow with the second file erases all of the victim's imported contacts.
Step 4: Confirm the results
The report shows the outcome of each action. The first image shows the result of deleting the account:

The second image shows the result of erasing the contacts:

A video demonstration of the attack was also recorded and linked as an unlisted YouTube video:
Root cause
The actions on m.badoo.com are performed without requiring a CSRF token. Nothing in the request as captured in Burp Suite distinguished a request generated by the legitimate site from one generated by a page on another origin, so a victim's browser could be made to send it while carrying the victim's session.
The requests used a JSON content type, and the researcher bypassed the parser behaviour it caused by adding the ignore_me member. Here the researcher reports that the parser appended an = to the content because of the JSON content type, and that this was bypassed by adding the ignore_me member with quote and equals characters in its value. The report does not describe the server-side parsing in more detail, so the exact mechanism by which that member defeats the parser behaviour is not stated.
Impact
An attacker who can get a victim with an active session to open the crafted file and click the submit button can delete that victim's account, or erase all of the victim's imported contacts, on the m.badoo.com subdomain. The researcher describes the scenario as potentially critical because it applies to any person who has an account on that subdomain. The attack depends on the victim holding an active session and on the victim interacting with the page (opening the file and clicking submit).
Fix
The report recommends using a CSRF token that must be random and must change for every outgoing request to m.badoo.com. The report does not state what change, if any, was actually made.
Variants to test
- Apply the same form-based approach to other state-changing endpoints on the mobile subdomain. A positive result is the action taking effect on the victim's account after the victim submits the crafted form.
- Test endpoints that accept JSON bodies for the same parser behaviour described here, adding a member whose value contains quote and equals characters. A positive result is the request being accepted and the action performed without a CSRF token.
- Test whether the same actions can be triggered without a click, for example by a form that submits itself on load. A positive result is the action completing as soon as the victim opens the page.
- A positive result is the same cross-origin
POSTsucceeding elsewhere.
Hunting notes
The signal during recon is a state-changing request whose captured headers contain no anti-CSRF token, especially when the body is JSON and the endpoint is reachable from a browser session.
The researcher showed impact by producing HTML files for two destructive actions, capturing the results as images, and recording a video demonstration.
What happened, in plain words
The report concerns the subdomain m.badoo.com. On that mobile site, a logged-in person can do things like delete their own account, or erase all the contacts they have imported into Badoo.
This report is about a bug that let someone else make those two things happen to you, without your permission. The trick is called Cross-Site Request Forgery, or CSRF for short. The researcher found it, built two small web pages that carry out the attack, and showed that they work.
To follow the rest of this article you only need to know how a browser works. Everything else is explained as it comes up.
The pieces you need to understand first
Before the attack makes sense, here are a few everyday ideas.
A session and a cookie. When you log in to a website, the site needs a way to remember that you are you on the next page you open. It usually does this by giving your browser a small piece of text called a cookie. Your browser stores it and sends it back with every request you make to that site. Think of it like a wristband you get at an event: the staff check it at every door, and as long as you wear it, you are let in. The report calls this an active session: you are logged in, and your browser is holding that wristband.
A request. Every time your browser asks a website to do something, it sends a request. A GET request is like asking to see a page. A POST request is like handing over a form: it carries data and asks the site to change something, such as saving a setting or deleting a record.
JSON. When a browser sends data to a site, the data has to be in a format both sides understand. JSON is one such format. It looks like a list of labels and values, for example "name":"value". The report says the content type was JSON.
A CSRF token. Because browsers automatically attach your cookie to every request to a site, a malicious page elsewhere on the internet can also cause your browser to send a request to that site, and your cookie will go along with it. To stop this, many sites add a second secret value to each form, called a CSRF token. The site checks that the token matches what it expects. A page on another site cannot know that token, so its forged request is rejected. Think of it as a second wristband that is different for every door and that only the real site can hand out.
Cross-Site Request Forgery (CSRF). This is the bug that happens when a site changes something on your behalf but does not check for that second secret. A page controlled by an attacker can then make your browser send the request, and the site will act on it as if you had asked.
Burp Suite. A tool that sits between your browser and a website and lets you look at the requests and responses going back and forth. The researcher used it to inspect the traffic.
How the researcher found it
The researcher used Burp Suite to capture the request and response headers for the two account-management actions: deleting the account, and erasing imported contacts.
While looking at that traffic, one thing stood out: there was no CSRF token being used. In other words, the requests that delete an account and erase contacts carried nothing that a page on another website could not also produce. That observation is the whole finding.
There was one extra detail that mattered when building the attack. The requests use a JSON content type, and the researcher notes that because of this the parser introduced an = at the end of the content in the header. That behaviour was bypassed by adding this value to the body:
"ignore_me":"' value='test".
Line by line, in plain words:
"ignore_me"is a made-up label. It is not a real field the site needs; the name is chosen to be harmless.:separates the label from its value, as in any JSON pair."' value='test".is the value itself. It contains a single quote, the wordvalue, an equals sign, another single quote, the wordtest, and then a double quote and a full stop. The researcher says that including these quote and equals characters in the value was enough to get past the parser behaviour caused by the JSON content type.
The report does not describe the server-side parsing in more detail, so the exact mechanism by which this extra member defeats that behaviour is not stated.
Building and delivering the attack
The attack is delivered as an HTML file, which is just a web page saved as a file on a computer. When the victim opens the file and clicks a submit button, the browser sends a POST request to m.badoo.com. The submit button is described as being there for demonstration purposes. The same pattern is used twice: once for account deletion and once for erasing imported contacts.
Step 1: Prepare the two HTML files
Create two HTML files, one for deletion and one for erasing contacts. Both are described as attached to the report. Each file is opened by the victim and has a submit button. The body sent with the request includes the ignore_me member shown above, to work around the parser behaviour on the JSON content type.
Why this step: the attacker needs a page that the victim's browser will run, and that page must be able to send the same request the real site sends. A form is the simplest way to make a browser send a POST.
Step 2: Deliver the file to the victim
The attacker sends the crafted HTML file to the victim. The victim must have an active session on m.badoo.com for the request to be accepted as that user.
Why this step: the site identifies the person by the cookie in their browser. If the victim is not logged in, there is no wristband, and the request means nothing to the site.
Step 3: The victim opens the file and submits
As soon as the victim opens the file and clicks the submit button, a delete POST request is made to m.badoo.com and the victim's account is deleted. The same flow with the second file erases all of the victim's imported contacts.
Why this step: this is the moment the forged request leaves the victim's browser, carrying the victim's cookie, and the site acts on it because it has no way to tell it apart from a genuine request.
Step 4: Confirm the results
The report shows the outcome of each action. The first image shows the result of deleting the account:

The second image shows the result of erasing the contacts:

A video demonstration of the attack was also recorded and linked as an unlisted YouTube video:
Why it worked
The actions on m.badoo.com are performed without requiring a CSRF token. Nothing in the request as captured in Burp Suite distinguished a request generated by the legitimate site from one generated by a page on another origin, so a victim's browser could be made to send it while carrying the victim's session.
The requests used a JSON content type, and the researcher bypassed the parser behaviour it caused by adding the ignore_me member. Here the researcher reports that the parser appended an = to the content because of the JSON content type, and that this was bypassed by adding the ignore_me member with quote and equals characters in its value. The report does not describe the server-side parsing in more detail, so the exact mechanism by which that member defeats the parser behaviour is not stated.
What an attacker could do with it
An attacker who can get a victim with an active session to open the crafted file and click the submit button can delete that victim's account, or erase all of the victim's imported contacts, on the m.badoo.com subdomain. The researcher describes the scenario as potentially critical because it applies to any person who has an account on that subdomain. The attack depends on the victim holding an active session and on the victim interacting with the page, by opening the file and clicking submit.
The fix
The report recommends using a CSRF token that must be random and must change for every outgoing request to m.badoo.com.
Other places to look
- Apply the same form-based approach to other state-changing endpoints on the mobile subdomain. A positive result is the action taking effect on the victim's account after the victim submits the crafted form.
- Test endpoints that accept JSON bodies for the same parser behaviour described here, adding a member whose value contains quote and equals characters. A positive result is the request being accepted and the action performed without a CSRF token.
- Test whether the same actions can be triggered without a click, for example by a form that submits itself on load. A positive result is the action completing as soon as the victim opens the page.
- A positive result is the same cross-origin
POSTsucceeding elsewhere.
Notes for anyone hunting this bug
The signal during recon is a state-changing request whose captured headers contain no anti-CSRF token, especially when the body is JSON and the endpoint is reachable from a browser session.
The researcher showed impact by producing HTML files for two destructive actions, capturing the results as images, and recording a video demonstration.
Glossary
- Badoo: the service whose subdomain
m.badoo.comis the subject of the report. - Subdomain: a part of a website's address that sits in front of the main domain, here
m.in front ofbadoo.com. - Session: the period during which a website remembers that you are logged in.
- Cookie: a small piece of text a website stores in your browser and your browser sends back with each request to that site, often used to identify your session.
- Active session: being logged in, with your browser holding the cookie that proves it.
- Request: a message your browser sends to a website asking it to do something.
GETrequest: a request that asks to see a page or resource.POSTrequest: a request that carries data and asks the site to change something.- Header: extra information attached to a request or response, such as the type of content being sent.
- Content type: the part of a request that says what format the data is in, for example JSON.
- JSON: a text format for data made of labels and values, such as
"name":"value". - Parser: the part of a server that reads incoming data and turns it into something the program can use.
- CSRF token: a secret value added to a request that a page on another site cannot know, used to prove the request came from the real site.
- Cross-Site Request Forgery (CSRF): a bug where another website can make your browser send a request that changes something on a site where you are logged in.
- Origin: the combination of scheme, host and port that identifies where a page came from; a page on one origin is not supposed to be able to read responses from another.
- Cross-origin: coming from a different origin than the site being targeted.
- Endpoint: a specific address on a site that performs a particular action.
- State-changing operation: an action that changes data, such as deleting an account or erasing contacts.
- Burp Suite: a tool that sits between your browser and a website so you can inspect and modify the requests and responses.
- HTML file: a web page saved as a file on a computer, which a browser can open and run.
- Form: the part of a web page that collects data and sends it to a site when you submit it.
- Proof of concept (PoC): a working demonstration that a bug can actually be exploited.
- Triager: the person on a bug bounty platform who first reviews a report and decides how serious it is.
- Bug bounty: a programme where organisations pay researchers for reporting security bugs to them.
- Severity: a rating of how serious a bug is.
- Bounty: the money paid to a researcher for a valid report.