Skip to content
CSRF Disclosed report Beginner

authenticity token not verfied leads to change business name

The signup form did not properly validate the authenticity token, so a request with a modified token still succeeded, potentially allowing altered account information such as the business name to be submitted.

cforu12 Follow

Originally disclosed on HackerOne

Bounty$1,900 Medium View original
  • Paid in 8 days
  • Disclosed after 24 days

Hello security team , while sign up I have noticed that authenticity token is not verified leads to change info like business name #Steps to reproduce 1- visit this url https://www.shopify.com/partners and add you mail then click on join now 2- Then fill out your data and click on create new partner account fill out the data then intercept the request with burp proxy I have notice is that the request looks like this

POST /signup HTTP/1.1
Host: partners.shopify.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://partners.shopify.com/signup
Content-Type: application/x-www-form-urlencoded
Content-Length: 690
Connection: close
Cookie: █████
Upgrade-Insecure-Requests: 1

authenticity_token=2vAI2NSYAWswz76VP5oZOX9qsoS%2BriQxAkUstj53i1xLI59byffVldnssNEjtHqZKcM%2BQ1VRq5kheL5Vibf%2FTw%3D%3D&organization%5Bbusiness_name%5D=df&organization%5Bbusiness_email%5D=cforu%2B6%40wearehackerone.com&organization%5Bwebsite%5D=&address%5Baddress1%5D=fake&address%5Baddress2%5D=&address%5Bcity%5D=cairo&address%5Bcountry_code%5D=EG&address%5Bprovince_code%5D=C&address%5Bpostal_code%5D=123&signup_profile_form%5Bprimary_revenue_intent%5D=other&signup_profile_form%5Bcustom_primary_revenue_intent%5D=bug+bounty&signup_profile_form%5Bcustom_other_platforms%5D=&signup_profile_form%5Bother_platforms%5D%5B%5D=no_platform&partner_agreement_accepted=0&partner_agreement_accepted=1

now generate csrf poc with burp suite and try to change the value of the authenticity_token paramter notice that here the request will go through I have attached a video to make it easy for you

As a summary The problem is that the authenticity_token is not properly validated and leads to change info being submitted what i was doing in the video is that i tried to change two or more chars to prove that it may be validating the length of the token I don't know actually but it works

Impact

forcing user to change settings like business name

The original report as published on HackerOne, by cforu12. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

Shopify runs a partner programme, and the signup flow for it lives on partners.shopify.com. A new partner fills in a form with their organisation details (business name, business email, website) and address, and the browser posts that form to the /signup endpoint. Like most Rails applications, the form carries an authenticity_token field, the per-session CSRF token that the server is supposed to check before accepting a state-changing request.

The researcher found that this token was not properly validated on the signup endpoint, and a cross-site request forgery proof of concept built from the captured request still went through.

Setup

  • Target: partners.shopify.com, the Shopify partner signup flow.
  • Entry point: https://www.shopify.com/partners, where an email is entered and the "join now" button is clicked.
  • Tooling: a browser, Burp Suite as an intercepting proxy, and Burp's built-in CSRF PoC generator.
  • No special account or privilege was needed beyond being able to reach the public signup form.

Finding it

While signing up, the researcher noticed that the authenticity_token was not verified. The signup request carries the token as a normal form field, so if the server does not actually compare it against the session, an attacker who can make a victim's browser post the form can supply a modified token value and the request will still be processed.

Exploitation

Step 1: Start the signup flow

Visit https://www.shopify.com/partners, enter an email address and click "join now". This leads into the partner account creation form.

Step 2: Fill the form and intercept the request

Fill out the data and click "create new partner account", with Burp Proxy configured to intercept. The captured request looks like this:

HTTP
POST /signup HTTP/1.1
Host: partners.shopify.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://partners.shopify.com/signup
Content-Type: application/x-www-form-urlencoded
Content-Length: 690
Connection: close
Cookie: █████
Upgrade-Insecure-Requests: 1

authenticity_token=2vAI2NSYAWswz76VP5oZOX9qsoS%[redacted]%2BQ1VRq5kheL5Vibf%2FTw%3D%3D&organization%5Bbusiness_name%5D=df&organization%5Bbusiness_email%5D=cforu%2B6%40wearehackerone.com&organization%5Bwebsite%5D=&address%5Baddress1%5D=fake&address%5Baddress2%5D=&address%5Bcity%5D=cairo&address%5Bcountry_code%5D=EG&address%5Bprovince_code%5D=C&address%5Bpostal_code%5D=123&signup_profile_form%5Bprimary_revenue_intent%5D=other&signup_profile_form%5Bcustom_primary_revenue_intent%5D=bug+bounty&signup_profile_form%5Bcustom_other_platforms%5D=&signup_profile_form%5Bother_platforms%5D%5B%5D=no_platform&partner_agreement_accepted=0&partner_agreement_accepted=1

The important parts of the body:

  • authenticity_token is sent as a regular URL-encoded form parameter, alongside the rest of the form data.
  • organization[business_name], organization[business_email] and organization[website] hold the organisation details.
  • address[address1], address[address2], address[city], address[country_code], address[province_code] and address[postal_code] hold the address.
  • signup_profile_form[...] fields describe the partner's revenue intent and other platforms.
  • partner_agreement_accepted appears twice, first as 0 and then as 1.

The Cookie header carries the session and is redacted here.

Step 3: Generate a CSRF PoC and tamper with the token

Using Burp Suite's CSRF PoC generator on this request, the researcher produced a cross-site proof of concept and then changed the value of the authenticity_token parameter. The request still went through. The researcher also tried changing two or more characters of the token, to test whether the server might be validating only the length of the token; the request still went through.

A video was attached to the report to demonstrate the flow.

Root cause

The server accepts the signup POST without properly validating the authenticity_token against the session. Because the token is just another form field, a forged cross-site request can carry an arbitrary or modified token and still be processed. The researcher's experiments with altered characters suggest the check is either absent or reduced to something superficial such as a length check, though the report does not establish which.

Impact

The report's stated impact is that an attacker can force a user to change settings such as the business name. The report frames the impact as forcing a user to change settings like the business name; it does not describe any wider consequence.

Fix

The report does not describe a fix. The appropriate fix is for the server to validate the authenticity_token against the session on the signup endpoint and reject requests whose token does not match, rather than accepting any value of the right shape.

Variants to test

  • On other Rails-style forms, remove the authenticity_token parameter entirely and resend: a positive result is the request being processed as normal.
  • Replace the token with a value from a different session: a positive result is acceptance, which shows the token is not bound to the session.
  • Change a few characters of the token while keeping its length: a positive result points to a length-only or otherwise superficial check.
  • Generate a CSRF PoC from the captured request and load it in a browser with an active session: a positive result is the state change being applied without any user interaction beyond visiting the page.

Hunting notes

Signup and onboarding forms are a good place to look, because they are often added outside the main authenticated application and may not go through the same CSRF protections. The signal is a state-changing POST whose body carries an authenticity_token field: capture it, tamper with the token, and see whether the server still accepts the request. To show impact, demonstrate the change actually being applied through a generated CSRF PoC, as the researcher did here with the business name.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

Shopify runs a partner programme: people who want to sell services around Shopify sign up for a partner account. The signup form lives on partners.shopify.com. You type in your organisation details (business name, business email, website) and your address, and your browser sends that form to a page called /signup.

Like most web forms built with a framework called Rails, this form contains a hidden field called authenticity_token. Think of it as a numbered ticket that the server hands out when it gives you the form, and that it expects to see again when you hand the form back. The idea is that only the person who was given the form can submit it, because only they know the ticket number. A malicious website that tries to make your browser submit the form on its own will not know your ticket number, so the server should reject it.

The researcher found that the server did not actually check the ticket properly on the signup page. That meant a malicious page could make a person's browser submit the signup form with an altered ticket, and the server would still accept it, which the report says could change information such as the business name.

This kind of attack is called Cross-Site Request Forgery, or CSRF. The everyday comparison: imagine a bank that accepts withdrawal slips without checking the signature, as long as the slip is filled in. Anyone who can slip a pre-filled form in front of you can get your money moved, even though you never meant to ask for it.

Background you need

A few ideas come up again and again below, so here they are from zero.

  • A web request is the message your browser sends to a server when you click something or submit a form. It has a first line saying what it wants (for example POST /signup), a set of headers (extra information such as which browser you use and which cookies you hold), and often a body (the actual form data).
  • A cookie is a small piece of text a website stores in your browser so it can recognise you on the next request. It is how a site knows you are logged in. If someone else gets your cookie, they can often act as you.
  • A token here means a random-looking string the server generates and puts inside a form. The authenticity_token is exactly that: a value tied to your browsing session, meant to prove the form came from a page the server itself served to you.
  • A proxy is a program that sits between your browser and the internet and lets you look at, and change, the traffic passing through. Burp Suite is a popular proxy used by security testers. When it is set to "intercept", it pauses each request so you can read or edit it before it continues.
  • A CSRF PoC (proof of concept) is a small web page that automatically submits a form to a target site when you open it. Burp Suite can generate one from a captured request. It is the practical demonstration that an attacker's page can make your browser send a request you did not intend.
  • URL encoding is how special characters are written inside form data. For example %5B means [, %5D means ], %40 means @, %2B means + and %3D means =. So organization%5Bbusiness_name%5D is really organization[business_name].

Setting up

  • Target: partners.shopify.com, the Shopify partner signup flow.
  • Starting point: https://www.shopify.com/partners, where you enter an email and click "join now".
  • Tools: a browser, Burp Suite acting as an intercepting proxy, and Burp's built-in CSRF PoC generator.
  • Access needed: none beyond being able to reach the public signup form. No account or special permission was required.

Finding it

While signing up, the researcher noticed that the authenticity_token was not verified. The token travels as an ordinary form field, mixed in with the business name and address. If the server never compares it with the session, then anyone who can make a victim's browser post the form can put in a modified token value and the request is still processed.

Exploitation

Step 1: Start the signup flow

Go to https://www.shopify.com/partners, enter an email address and click "join now". This takes you into the partner account creation form. This step is just to get a genuine form and a genuine request to study.

Step 2: Fill the form and intercept the request

Fill in the data and click "create new partner account", with Burp Proxy set to intercept. The captured request looks like this:

HTTP
POST /signup HTTP/1.1
Host: partners.shopify.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://partners.shopify.com/signup
Content-Type: application/x-www-form-urlencoded
Content-Length: 690
Connection: close
Cookie: █████
Upgrade-Insecure-Requests: 1

authenticity_token=2vAI2NSYAWswz76VP5oZOX9qsoS%[redacted]%2BQ1VRq5kheL5Vibf%2FTw%3D%3D&organization%5Bbusiness_name%5D=df&organization%5Bbusiness_email%5D=cforu%2B6%40wearehackerone.com&organization%5Bwebsite%5D=&address%5Baddress1%5D=fake&address%5Baddress2%5D=&address%5Bcity%5D=cairo&address%5Bcountry_code%5D=EG&address%5Bprovince_code%5D=C&address%5Bpostal_code%5D=123&signup_profile_form%5Bprimary_revenue_intent%5D=other&signup_profile_form%5Bcustom_primary_revenue_intent%5D=bug+bounty&signup_profile_form%5Bcustom_other_platforms%5D=&signup_profile_form%5Bother_platforms%5D%5B%5D=no_platform&partner_agreement_accepted=0&partner_agreement_accepted=1

Line by line, in plain words:

  • POST /signup HTTP/1.1 says the browser is sending data to the /signup page, using version 1.1 of the HTTP protocol. POST means "here is data to store or act on", as opposed to GET, which just asks for a page.
  • Host: partners.shopify.com names the server the request is addressed to.
  • User-Agent: ... tells the server which browser and operating system sent the request. Here it is Firefox 68 on 64-bit Linux.
  • Accept: ... lists the kinds of response the browser is willing to receive, mostly HTML and XML.
  • Accept-Language: en-US,en;q=0.5 says the browser prefers US English.
  • Accept-Encoding: gzip, deflate says the browser can accept a compressed response to save bandwidth.
  • Referer: https://partners.shopify.com/signup tells the server which page the request came from. Note the spelling: the header really is called Referer, a historical misspelling.
  • Content-Type: application/x-www-form-urlencoded says the body is form data encoded in the usual name=value&name=value style.
  • Content-Length: 690 says the body is 690 bytes long, so the server knows where it ends.
  • Connection: close asks the server to close the connection after replying.
  • Cookie: █████ carries the session cookie, the thing that identifies the logged-in user. It is redacted here because it is a secret: anyone holding it could act as that user.
  • Upgrade-Insecure-Requests: 1 tells the server the browser would prefer an encrypted (HTTPS) version of any plain HTTP links.
  • The blank line separates the headers from the body.
  • The body is one long line of form fields joined by &. Decoding the URL encoding, the important parts are:
    • authenticity_token is sent as a regular form parameter, right alongside the rest of the data. That is the field under test.
    • organization[business_name], organization[business_email] and organization[website] hold the organisation details.
    • address[address1], address[address2], address[city], address[country_code], address[province_code] and address[postal_code] hold the address.
    • signup_profile_form[...] fields describe the partner's revenue intent and which other platforms they use.
    • partner_agreement_accepted appears twice, first as 0 and then as 1. When a name appears twice, servers commonly take the last value, so the effective value is 1.

Step 3: Generate a CSRF PoC and tamper with the token

Using Burp Suite's CSRF PoC generator on this captured request, the researcher produced a cross-site proof of concept, then changed the value of the authenticity_token parameter. The request still went through. The researcher also tried changing two or more characters of the token, to test whether the server might be checking only the length of the token; the request still went through.

Why this matters: if the server truly compared the token with the one it issued to your session, a changed token would be rejected. The fact that an altered token is accepted shows the check is missing or too weak to stop a forged request. A video was attached to the report to demonstrate the flow.

Root cause

The server accepts the signup POST without properly validating the authenticity_token against the session. Because the token is just another form field, a forged cross-site request can carry an arbitrary or modified token and still be processed. The experiments with altered characters suggest the check is either absent or reduced to something superficial such as a length check, though the report does not establish which.

Impact

The report's stated impact is that an attacker can force a user to change settings such as the business name. The report frames the impact as forcing a user to change settings like the business name; it does not describe any wider consequence.

Fix

The report does not describe a fix. The appropriate fix is for the server to validate the authenticity_token against the session on the signup endpoint and reject requests whose token does not match, rather than accepting any value of the right shape.

Variants to test

These are other ways to probe the same weakness on similar forms. Each one is a small experiment with a clear pass or fail.

  • On other Rails-style forms, remove the authenticity_token parameter entirely and resend. If the request is processed as normal, the token is not being enforced.
  • Replace the token with a value from a different session. If it is accepted, the token is not bound to the session it was issued for.
  • Change a few characters of the token while keeping its length. If it is accepted, the check is probably only looking at length, or at nothing at all.
  • Generate a CSRF PoC from the captured request and load it in a browser with an active session. If the change is applied without any user interaction beyond visiting the page, the forgery works.

Hunting notes

Signup and onboarding forms are a good place to look, because they are often added outside the main logged-in application and may not go through the same CSRF protections. The signal is a state-changing POST whose body carries an authenticity_token field: capture it, tamper with the token, and see whether the server still accepts the request. To show impact, demonstrate the change actually being applied through a generated CSRF PoC, as the researcher did here with the business name.

Glossary

  • CSRF (Cross-Site Request Forgery): an attack where a malicious page makes your browser send a request to another site you are logged in to, so the action happens as if you had asked for it.
  • authenticity_token: a random value placed in a form by the server and expected back on submission, used to prove the form came from that server and that session.
  • Session: the server's memory of who you are across multiple requests, usually keyed by a cookie.
  • Cookie: a small piece of text stored in your browser and sent with requests so a site can recognise you.
  • Header: extra information at the top of a web request or response, such as the browser type or the content type.
  • Body: the part of a request that carries the actual data, such as form fields.
  • POST: an HTTP method used to send data to a server, typically to create or change something.
  • GET: an HTTP method used to ask for a page or resource without changing anything.
  • Endpoint: a specific address on a server that handles a particular action, such as /signup.
  • Proxy: a program that sits between your browser and the internet so you can inspect and modify traffic.
  • Burp Suite: a tool used by security testers that includes an intercepting proxy and a CSRF PoC generator.
  • Intercept: pausing a request in the proxy so it can be read or edited before it is sent on.
  • CSRF PoC: a small page that automatically submits a form to a target site, used to prove a forgery is possible.
  • URL encoding: writing special characters in form data as % codes, for example %5B for [ and %40 for @.
  • Rails: a web framework for building applications, known for including an authenticity_token field in forms by default.
  • Redacted: hidden or replaced with blocks, usually to protect a secret such as a session cookie.
  • Root cause: the underlying reason a vulnerability exists, as opposed to its visible symptom.
  • Impact: what an attacker could actually do or damage if the weakness is exploited.

More from Shopify

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.