Critical Account Takeover via CSRF Header Bypass
The profile-update endpoint accepted state-changing requests without a valid CSRF token when the request was sent as form-encoded data instead of JSON. An attacker could craft a form that changes a victim's profile, including the email address, potentially leading to account takeover if the password-reset flow could be abused.
Mohammad-Nouri Almohammad Follow
Published on medium.com
Cybersecurity
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.
Context
Canva runs an attendee networking portal, and the feature under review was profile editing: the form where a user changes fields such as first name or job title. Profile forms are unglamorous, but they can carry sensitive fields, and in this case the profile-update functionality included the email address associated with the account. That link between a profile field and account recovery is what turned an ordinary-looking form into something worth testing.
The research was done during a bug bounty assessment of Canva, in collaboration with duckeg97.

Setup
The work was done with Burp Suite, using a test account. The researcher edited the test account's profile, intercepted the resulting request, and then replayed modified versions of it. The proof of concept later used a plain HTML form, so no special tooling was needed on the victim side beyond a browser.
The precondition for the whole finding is that a victim is authenticated to the portal: the attack relies on the victim's browser carrying the session while submitting a request the server accepts.
Finding it
The starting question was simple: would the server still accept a profile update if the request did not include its expected CSRF protection? A header being present in a request does not mean the server enforces it correctly, so the only way to answer was to remove it and see what happened.
After editing the test account's profile, the corresponding request was intercepted. The original request used JSON:
POST /XXX/XXX/XXX/ApiToken=xxxx HTTP/2Host: target.comContent-Type: application/jsonRfcsrf: [CSRF token]
The request body contained the profile fields and additional parameters expected by the application. The CSRF protection travelled in an Rfcsrf header, and the body was JSON.
Exploitation
Step 1: modify the request in Burp Suite
The request was changed in four ways:
- The
Rfcsrfheader was removed. - The content type was changed to
application/x-www-form-urlencoded. - The request body was adapted to the new format.
- The modified request was submitted using the test account.
Under the tested conditions, the endpoint accepted the request and processed the profile update without the expected CSRF token. The application appeared to handle the modified request differently from the original JSON request, allowing a state-changing operation to proceed without the expected protection.
Step 2: reproduce it from a browser
A modified request in Burp Suite is not a CSRF vulnerability on its own. The practical question is whether an attacker can make a victim's authenticated browser submit a request the application accepts. To answer it, a proof of concept was built as an HTML form submission targeting the affected endpoint.
The test involved the profile-update endpoint, the expected workflow parameters, profile data encoded in the format the endpoint accepted, and a browser form capable of submitting the request. The target URL and sensitive identifiers are redacted in the published form:
The form posts as application/x-www-form-urlencoded, which is what a browser sends by default, and carries the workflow parameters as hidden fields: workflowApiToken, valueMapJson, objectId and attendeeSettings. No CSRF token field is present. The important result was that the server processed the profile-update operation despite the missing CSRF token in the tested request format.
Step 3: the account takeover chain
A CSRF vulnerability matters more when the affected action changes security-relevant account information, and here the profile-update functionality included an email field. The potential chain had three parts:
- An attacker induces an authenticated user to submit a crafted profile-update request.
- The request changes the email address associated with the account.
- The attacker attempts to use the password-reset workflow to gain control of the account.
The researcher is explicit about the limit: a successful CSRF-based profile update does not automatically prove account takeover. The complete chain depends on how the application validates email changes, verifies ownership of new email addresses, and handles password recovery. The difference between possible impact and demonstrated impact matters.
Root cause
The main issue was insufficient CSRF enforcement on a state-changing endpoint, combined with content-type handling that allowed the request to be processed without the expected CSRF token. The application appeared to treat the form-encoded request differently from the JSON request the frontend normally sends, and in that path the Rfcsrf header was not required.
Likely, the server relied on the client supplying a specific header rather than consistently validating a token for every accepted request format. A robust implementation should not depend on a particular header being present; CSRF defences must be enforced for every format the endpoint accepts.
Impact
If the complete attack chain is exploitable, the consequences could include:
- Account integrity: an attacker could modify profile information without the account owner's consent.
- Account ownership: if an unverified email change can be combined with a vulnerable password-reset workflow, an attacker may be able to take over an account.
- Confidentiality: a successfully compromised account could expose information accessible to that account.
- Trust and reputation: account impersonation and unauthorised changes could undermine users' confidence in the platform.
The actual severity depends on the application's authentication requirements, browser behaviour, email-verification controls, and password-reset implementation.
Fix
The report lists defensive measures rather than describing the patch that was applied:
- Enforce CSRF validation server-side, rejecting state-changing requests that lack a valid CSRF token.
- Apply protections consistently, and do not bypass CSRF validation because a request uses a different content type.
- Restrict accepted content types so endpoints accept only the formats they are designed to process.
- Verify email changes, requiring proof of ownership before treating a new address as the account's verified address.
- Secure account recovery so password-reset flows cannot let an unverified email change transfer account ownership.
- Add defence in depth: re-authentication, security notifications, and additional verification for sensitive account changes.
The issue was reported through Canva's bug bounty program. The report was accepted, moved to Triaged on 9 July 2025 and to Resolved on 15 August 2025, and a bounty was issued.
Variants to test
- Alternate content types on state-changing endpoints. Take a JSON endpoint that carries a CSRF header and resend the same operation as
application/x-www-form-urlencodedwith the token removed. A positive result is a successful state change without the CSRF token. - Header-only CSRF tokens. Remove the CSRF header while keeping everything else intact. A positive result is that the server processes the request instead of rejecting it.
- Profile fields tied to recovery. Look for email, phone or similar fields in profile forms and check whether a change takes effect before ownership is verified. A positive result is an email change that takes effect before ownership is verified.
- Workflow parameters in the body. Where the endpoint takes parameters such as
workflowApiToken,valueMapJsonorobjectId, try supplying them as ordinary form fields. A positive result is that the server accepts the form submission without a CSRF token. - Cross-format parity. For each endpoint, compare how JSON and form-encoded requests are validated. A positive result is a format that skips a check the other format enforces.
What happened, in plain words
Canva is an online design platform. Alongside its main product it ran an attendee networking portal, a site where people who attend an event can create a profile and connect with each other. The feature under review was profile editing: the page where a user changes simple fields such as their first name or job title.
A profile form looks harmless. But this one also contained the email address linked to the account, and the email address is the key to account recovery: if you forget your password, the reset link goes to that address. So a form that can change the email may, if email changes are not verified, affect who controls the account.
The researcher, working with duckeg97, found that the server accepted a profile update even when the request arrived without the security token it was supposed to require. Worse, the server behaved differently depending on the format of the request: the format a normal web page sends was accepted without the expected CSRF token, unlike the JSON request.. That opened the door to a Cross-Site Request Forgery (CSRF) attack, where a victim's own logged-in browser is tricked into sending the request.

The work was done during a bug bounty assessment of Canva. A bug bounty programme is a scheme where a company invites outside researchers to look for security problems and pays them for valid reports, instead of prosecuting them.
The words you need first
Before the steps, a few ideas from zero.
- Request. When you click a button on a website, your browser sends a small message to the company's computer (the server) saying what you want. That message is a request. The server sends a reply, and the browser draws the next page.
- API. An API is the set of addresses and rules a website's pages use to talk to its server behind the scenes. Think of a restaurant: the menu and the waiter are the API. You do not walk into the kitchen; you order through a fixed set of options. Here the profile form talks to a profile-update API.
- Endpoint. One specific address in that API, for one specific job. The profile-update endpoint is the address that saves profile changes.
- Cookie and session. When you log in, the server gives your browser a small piece of data called a cookie. The browser shows it on every later request, so the server knows the request comes from you. This ongoing logged-in state is called a session. The whole attack depends on the victim having an active session.
- Token. A token is a short secret value, usually a long random string, that proves a request is legitimate. A CSRF token is a token the server puts into the real form and expects back with the submission. An attacker's page cannot read it, so the attacker cannot include it.
- CSRF (Cross-Site Request Forgery). Imagine someone fills in a change-of-address card in your name and slips it into a pile of papers you are signing. Your signature is genuine, but the request is not yours. In CSRF, a malicious page makes your browser send a request to a site where you are logged in. Your browser attaches your cookie automatically, so the server thinks the request is yours. The defence is the CSRF token: something only the real page knows.
- Content-Type. A label on every request saying what format the data inside is in. Two common formats are JSON (a structured text format, like a labelled list) and
application/x-www-form-urlencoded(the simplename=value&name=valueformat a plain HTML form sends by default). - Header. Extra information attached to a request, separate from the body. Think of the envelope of a letter: the body is the letter, the headers are what is written on the envelope.
- Burp Suite. A tool that sits between your browser and the server and lets you pause a request, edit it, and send it on. It is the standard workbench for this kind of testing.
Setup
The work was done with Burp Suite, using a test account created for the purpose. Using your own test account matters: you can change its profile freely without touching a real person's data.
The researcher edited the test account's profile, intercepted the resulting request, and then replayed modified versions of it. The proof of concept later used a plain HTML form, so on the victim's side nothing more than a browser is needed.
The precondition for the whole finding is that the victim is logged in to the portal. The attack relies on the victim's browser carrying the session cookie while submitting a request the server accepts.
Finding it
The starting question was simple: would the server still accept a profile update if the request did not include its expected CSRF protection?
A header being present in a request does not mean the server enforces it correctly. A bouncer standing at a door proves nothing if he lets everyone through. So the only way to answer was to remove the protection and see what happened.
After editing the test account's profile, the corresponding request was intercepted. The original request used JSON:
POST /XXX/XXX/XXX/ApiToken=xxxx HTTP/2Host: target.comContent-Type: application/jsonRfcsrf: [CSRF token]
Line by line:
POSTis the type of request used to send data and change something on the server.GETis for reading a page;POSTis for submitting a form./XXX/XXX/XXX/ApiToken=xxxxis the path, the address of the endpoint on the server. TheXXXparts and theApiToken=xxxxvalue are placeholders: the published report hides the real ones.HTTP/2is the version of the web protocol used for the conversation.Host: target.comsays which website the request is for.target.comis a stand-in for the real domain.Content-Type: application/jsonsays the body is in JSON format.Rfcsrf: [CSRF token]is the header carrying the CSRF token. This is the protection the researcher wanted to test.
The request body contained the profile fields and the additional parameters the application expected. The CSRF protection travelled in an Rfcsrf header, and the body was JSON.
Exploitation
Step 1: modify the request in Burp Suite
The request was changed in four ways:
- The
Rfcsrfheader was removed. - The content type was changed to
application/x-www-form-urlencoded. - The request body was adapted to the new format.
- The modified request was submitted using the test account.
Why each step? Removing the header tests whether the token is really checked. Changing the content type tests whether the server treats the two formats the same way. Adapting the body is necessary because a form-encoded body cannot be JSON. And submitting it with the test account shows what the server actually does.
Under the tested conditions, the endpoint accepted the request and processed the profile update without the expected CSRF token. The application appeared to handle the modified request differently from the original JSON request, allowing a change to be saved without the expected protection.
Step 2: reproduce it from a browser
A modified request in Burp Suite is not a CSRF vulnerability on its own. Burp can send anything; the question that matters is whether an attacker can make a victim's logged-in browser send a request the application accepts. To answer it, a proof of concept was built as an HTML form submission targeting the affected endpoint.
An HTML form is the ordinary mechanism behind every "Submit" button on the web. If a form can carry the attack, then any page the attacker controls can carry it too, and the victim only has to visit that page.
The test involved the profile-update endpoint, the expected workflow parameters, profile data encoded in the format the endpoint accepted, and a browser form capable of submitting the request. The target URL and sensitive identifiers are redacted in the published form:
Line by line:
<form method="POST" action="...">opens the form.method="POST"means the browser will send the data as a POST request, andactionis the address it will be sent to. TheXXXparts andApiToken=xxxxare redacted placeholders.<input type="hidden" name="workflowApiToken" value="xxxx">is a field the user never sees.nameis the label the server reads,valueis what gets sent.workflowApiTokenis one of the workflow parameters the endpoint expects.<input type="hidden" name="valueMapJson" value="REDACTED_TEST_PROFILE_DATA">carries the profile data itself, in the redacted published version.<input type="hidden" name="objectId" value="REDACTED">identifies which object, here the profile, the change applies to.<input type="hidden" name="attendeeSettings" value="REDACTED">carries further attendee settings the endpoint expects.<input type="submit" value="Submit">is the visible button. On an attacker's page it can be disguised, or the form can be submitted automatically by a short script.
The form posts as application/x-www-form-urlencoded, which is what a browser sends by default, and carries the workflow parameters as hidden fields: workflowApiToken, valueMapJson, objectId and attendeeSettings. No CSRF token field is present. The important result was that the server processed the profile update despite the missing CSRF token in the tested request format.
Step 3: the account takeover chain
A CSRF vulnerability matters more when the affected action changes security-relevant account information, and here the profile-update functionality included an email field. The potential chain had three parts:
- An attacker induces an authenticated user to submit a crafted profile-update request.
- The request changes the email address associated with the account.
- The attacker attempts to use the password-reset workflow to gain control of the account.
In plain terms, the potential chain is: the attacker gets the victim to load a page, the victim's browser sends the profile change, the account's email becomes an address the attacker controls, and the attacker then tries the password-reset flow.
The researcher is explicit about the limit: a successful CSRF-based profile update does not automatically prove account takeover. The complete chain depends on how the application validates email changes, verifies ownership of new email addresses, and handles password recovery. The difference between possible impact and demonstrated impact matters. In other words, the CSRF profile update was shown to work; the rest depends on checks the report does not claim to have defeated.
Root cause
The main issue was insufficient CSRF enforcement on an endpoint that changes data, combined with content-type handling that allowed the request to be processed without the expected CSRF token. The application appeared to treat the form-encoded request differently from the JSON request the frontend normally sends, and in that path the Rfcsrf header was not required.
Likely, the server relied on the client supplying a specific header rather than consistently validating a token for every accepted request format. A robust implementation should not depend on a particular header being present; CSRF defences must be enforced for every format the endpoint accepts. The everyday comparison: a club that checks ID only at the front door, and leaves the side door open, has not really checked ID.
Impact
If the complete attack chain is exploitable, the consequences could include:
- Account integrity: an attacker could modify profile information without the account owner's consent.
- Account ownership: if an unverified email change can be combined with a vulnerable password-reset workflow, an attacker may be able to take over an account.
- Confidentiality: a successfully compromised account could expose information accessible to that account.
- Trust and reputation: account impersonation and unauthorised changes could undermine users' confidence in the platform.
The actual severity depends on the application's authentication requirements, browser behaviour, email-verification controls, and password-reset implementation.
Fix
The report lists defensive measures rather than describing the patch that was applied:
- Enforce CSRF validation server-side, rejecting state-changing requests that lack a valid CSRF token.
- Apply protections consistently, and do not bypass CSRF validation because a request uses a different content type.
- Restrict accepted content types so endpoints accept only the formats they are designed to process.
- Verify email changes, requiring proof of ownership before treating a new address as the account's verified address.
- Secure account recovery so password-reset flows cannot let an unverified email change transfer account ownership.
- Add defence in depth: re-authentication, security notifications, and additional verification for sensitive account changes.
"Defence in depth" means several independent locks rather than one: if one fails, another still holds.
The issue was reported through Canva's bug bounty program. The report was accepted, moved to Triaged on 9 July 2025 and to Resolved on 15 August 2025, and a bounty was issued. "Triaged" means the company confirmed the report was valid and queued it for a fix; "Resolved" is the status the report was moved to.
Variants to test
If you want to look for the same class of bug yourself, these are the variations worth trying. Each one states what a positive result looks like.
- Alternate content types on state-changing endpoints. Take a JSON endpoint that carries a CSRF header and resend the same operation as
application/x-www-form-urlencodedwith the token removed. A positive result is a successful state change without the CSRF token. - Header-only CSRF tokens. Remove the CSRF header while keeping everything else intact. A positive result is that the server processes the request instead of rejecting it.
- Profile fields tied to recovery. Look for email, phone or similar fields in profile forms and check whether a change takes effect before ownership is verified. A positive result is an email change that takes effect before ownership is verified.
- Workflow parameters in the body. Where the endpoint takes parameters such as
workflowApiToken,valueMapJsonorobjectId, try supplying them as ordinary form fields. A positive result is that the server accepts the form submission without a CSRF token. - Cross-format parity. For each endpoint, compare how JSON and form-encoded requests are validated. A positive result is a format that skips a check the other format enforces.
Glossary
- API: the fixed set of addresses and rules a website's pages use to talk to its server, like a menu and waiter in a restaurant.
- Account takeover (ATO): an attacker gaining control of someone else's account, for example by changing its email and resetting the password.
- Attendee networking portal: a site where people attending an event create profiles and connect with each other.
- Bug bounty programme: a scheme where a company invites outside researchers to report security problems and pays for valid reports.
- Burp Suite: a tool that sits between browser and server, letting you pause, edit and resend requests.
- Content-Type: a label on a request saying what format its data is in, such as JSON or form-encoded.
- Cookie: a small piece of data a site stores in your browser after login and which the browser sends with later requests, so the server recognises you.
- CSRF (Cross-Site Request Forgery): an attack where a malicious page makes your logged-in browser send a request to another site, which trusts it because your cookie is attached.
- CSRF token: a secret value placed in a real form and expected back on submission, which an attacker's page cannot know or read.
- Defence in depth: using several independent protections so that one failing does not leave the system open.
- Endpoint: one specific address in an API that performs one specific job.
- Form-encoded (
application/x-www-form-urlencoded): the simplename=value&name=valuedata format a plain HTML form sends by default. - Header: extra information attached to a request, separate from its body, like what is written on an envelope.
- HTML form: the standard web mechanism behind a Submit button, which sends named fields to an address.
- HTTP/2: a version of the protocol browsers and servers use to exchange requests and replies.
- JSON: a structured text format for data, organised as labelled fields and values.
- POST: the request type used to send data and change something on the server, as opposed to reading a page.
- Request: the message a browser sends to a server asking it to do something.
- Resolved: in a bug bounty report, the state meaning the fix is in place.
- Session: the ongoing logged-in state created when you sign in, carried by a cookie.
- Token: a short secret value used to prove a request is legitimate.
- Triaged: in a bug bounty report, the state meaning the company has confirmed the report is valid and queued it for a fix.
Rfcsrf: the name of the header that carried the CSRF token in the original request.workflowApiToken,valueMapJson,objectId,attendeeSettings: the workflow parameters the profile-update endpoint expected, supplied as hidden form fields in the proof of concept.