Title: The $0.00
The billing update endpoint accepted a client-supplied amount array, allowing the recurring subscription price to be set to zero. An attacker could potentially obtain a premium plan for free, though the final payment was not completed because the test card was rejected.
medium.com
Published on medium.com
Mass Assignment
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
Semrush is a SaaS platform, and the feature under test here is the checkout and subscription flow for its paid plans. A free user can start a trial of a plan, and during billing the client sends the charge details to the backend. The write-up focuses on the "SEO PRO" plan and on the request that carries the billing information during checkout.
The researcher describes the finding as a price manipulation issue, a business logic flaw in which the server trusts the client for the amount to charge. The report was closed as a duplicate, but the Semrush security team confirmed it had reproduced the behaviour.
Setup
- A regular free user account on Semrush.
- Burp Suite configured to intercept traffic.
- A trial of the "SEO PRO" plan initiated through the normal checkout.
- No special role or privilege was needed; the flow is the one any free user sees when subscribing.
Finding it
While going through the billing process, the researcher intercepted a POST request to the billing information endpoint:
POST /v2/payment/billing-info/update
Inside the request body, one parameter stood out:
"amount":["0.00","139.95"]
The array holds two values: the charge for today, which is 0.00 because of the trial, and the future recurring charge of 139.95. The important observation is that the client is the one telling the server what the subscription costs. The price is not derived on the server from a product or offer identifier; it arrives in the request body and is used as-is.
Exploitation
Step 1: Intercept the billing request
The researcher started a trial for the "SEO PRO" plan with Burp Suite intercepting traffic, and captured the POST to /v2/payment/billing-info/update with the amount array in the body.
Step 2: Modify the recurring amount
The request was sent to Burp Repeater and the second value in the array was changed to 0.00, so the array became:
"amount":["0.00","0.00"]
Step 3: Forward and observe the response
The modified request was forwarded, and the server answered:
HTTP/2 200 OK
{"total_amount": "0.00", "base_amount": "0.00", "tax_amount": "0.00"}
The server accepted the manipulated price. The response reports a total, base and tax amount of 0.00. The frontend also reflected the change immediately, showing Next charge: £0.00 and Today's charge: £0.00.
Step 4: Attempt the transaction
The researcher could not complete the final transaction with a test credit card, because Stripe rejected it as fake. The backend logic, however, had fully accepted the manipulated amount up to that point.
Root cause
The server takes the price from a client-supplied parameter, amount, in the billing-info update request, instead of calculating it on the backend from the offer or product being purchased. The write-up states the server should verify the price on the backend based on the offer_hash or product ID. Because the amount is trusted as received, changing it changes both the response totals and what the checkout UI displays. The report does not describe any server-side check that rejected the tampered value; the request returned 200 with the modified amounts.
Impact
This is a price manipulation and business logic flaw. An attacker could potentially downgrade the cost of any premium plan to $0.00, which would mean direct financial loss for the company. The write-up hedges this: the final transaction was not completed because the test card was rejected by Stripe, so the demonstrated result is that the backend and the checkout UI accept and display the manipulated amount, not a completed zero-cost subscription.
Fix
The report does not say what was changed. The recommendation it gives is that the server should never trust the client for calculating prices, and should always verify the price on the backend based on the offer_hash or product ID.
Variants to test
- Intercept checkout and billing requests and modify parameters such as
amount,price,currencyanddiscount. A positive result is a 200 response whose totals match the tampered values and a checkout UI that displays them.
What happened, in plain words
A security researcher was testing Semrush, a website with paid subscription plans for marketing and search tools. He signed up as an ordinary free user, started a free trial of a paid plan, and watched the network traffic between his browser and Semrush's servers using a tool called Burp Suite. In one of the requests his browser sent during checkout, he noticed that the browser itself was telling the server how much the subscription should cost. He changed that number to zero, sent the request again, and the server accepted it: the response and the checkout page both showed a charge of 0.00. He could not finish the purchase because the test credit card he used was rejected by the payment processor Stripe, but the server had already accepted the fake price. He reported it on HackerOne, a bug bounty platform, and the Semrush security team confirmed they could reproduce it. The report was then closed as a duplicate, because another researcher had reported the same flaw first.
This article walks through the same story for someone who has never done security testing before. Every term is explained where it first appears, and the glossary at the end collects them all.
Background: what Semrush is and what was being tested
Semrush is a SaaS platform. SaaS stands for Software as a Service: instead of installing a program on your computer, you use a website that someone else runs, and you usually pay a monthly or yearly subscription for it. Semrush sells plans that help people with search engine optimisation (SEO), which is the work of making a website rank better in search results.
The feature under test is the checkout and subscription flow: the series of pages where a user picks a plan, enters payment details and confirms the purchase. A free user can start a trial of a paid plan, which means using the paid features for a limited time before being charged. During billing, the user's browser sends the charge details to the backend. The backend is the part of the service that runs on the company's servers, as opposed to the frontend, which is the part that runs in your browser and draws the pages you see.
The write-up focuses on one plan, called "SEO PRO", and on the request that carries the billing information during checkout.
The researcher describes the finding as a price manipulation issue. That is a kind of business logic flaw. Business logic means the rules a website follows about what is allowed: how much something costs, who may buy it, how many times, in what order. A business logic flaw is a mistake in those rules rather than in the low-level plumbing of the software. Here the rule that was broken is simple: the server trusted the client (the browser) to say how much to charge. In security terms, the server should never trust input that comes from the user's side, because the user can change it.
A useful everyday comparison: imagine a restaurant where the waiter asks you to write your own bill and hands it straight to the till. Most customers write the correct amount, but nothing stops anyone from writing a smaller one. The till should look up the price of each dish itself, not believe the piece of paper.
The report was closed as a duplicate, but the Semrush security team confirmed it had reproduced the behaviour.
Setup: what you need to follow along
- A regular free user account on Semrush. No special role or privilege was needed; the flow is the one any free user sees when subscribing.
- Burp Suite configured to intercept traffic. Burp Suite is a program that sits between your browser and the website and lets you pause, read and edit the requests your browser sends and the responses that come back. "Intercept" means catching a request before it reaches the server so you can look at it or change it.
- A trial of the "SEO PRO" plan initiated through the normal checkout.
A request, in this context, is a message your browser sends to a server asking for something or telling it something. A response is the server's reply. When you load a page or click a button, your browser usually sends several requests in the background, and some of them carry data the server needs, such as what you want to buy.
Finding it: following the money
The researcher went through the billing process as a normal user and intercepted a POST request to the billing information endpoint:
POST /v2/payment/billing-info/update
Line by line:
POSTis the type of request. A GET request asks the server to show you something; a POST request sends data to the server, usually to create or change something. Here the browser is sending billing information to be saved./v2/payment/billing-info/updateis the path, the address on the server that handles this kind of request. "v2" suggests a second version of this part of the service, and "billing-info/update" says plainly what it does: update billing information.- An endpoint is simply a specific address on a server that accepts a particular kind of request. Think of it as a counter in a large office building: the building has one address, but each counter deals with one kind of paperwork.
Inside the request body, one parameter stood out:
"amount":["0.00","139.95"]
Line by line:
- The request body is the part of the request that carries data, as opposed to the address and headers. Headers are extra labels attached to a request, such as what kind of data it contains or who is logged in.
- The body here is in JSON, a common text format for structured data. It uses names in quotes, a colon, and a value.
"amount"is the name of the field, and everything after the colon is its value. - The value is an array, which is an ordered list written between square brackets. This array has two items, both in quotes, so they are text strings:
"0.00"and"139.95". - The two values mean the charge for today, which is 0.00 because of the trial, and the future recurring charge of 139.95. A recurring charge is the amount billed again each period, for example every month, after the trial ends.
The important observation is that the client is the one telling the server what the subscription costs. The price is not worked out on the server from a product or offer identifier; it arrives in the request body and is used as it is. An identifier is a short code that names something, such as a particular plan, so the server can look up its real price in its own records.
Exploitation: step by step
Step 1: Intercept the billing request
The researcher started a trial for the "SEO PRO" plan with Burp Suite intercepting traffic, and captured the POST to /v2/payment/billing-info/update with the amount array in the body. The point of this step is to get a copy of the exact message the browser sends, so it can be replayed and edited by hand.
Step 2: Modify the recurring amount
The request was sent to Burp Repeater and the second value in the array was changed to 0.00, so the array became:
"amount":["0.00","0.00"]
Line by line:
- Burp Repeater is a part of Burp Suite that lets you take one captured request, edit it, send it again and again, and read each response. It is like keeping a letter, changing a word, and posting it again to see what comes back.
- The first value stays
"0.00", because today's charge was already zero during the trial. - The second value, the future recurring charge, is changed from
"139.95"to"0.00". If the server believes this number, the plan would cost nothing when the trial ends.
Step 3: Forward and observe the response
The modified request was forwarded, and the server answered:
HTTP/2 200 OK
{"total_amount": "0.00", "base_amount": "0.00", "tax_amount": "0.00"}
Line by line:
HTTP/2is the version of the protocol used to talk to the server. HTTP is the language browsers and servers use to exchange requests and responses; version 2 is a newer version of it.200 OKis the status code, a number that says how the request went. 200 means success. A status code like 400 or 403 would mean the server refused or the request was wrong.- The second line is the response body, again in JSON.
total_amount,base_amountandtax_amountare the total, the price before tax, and the tax. All three are"0.00".
The server accepted the manipulated price. The frontend also reflected the change immediately, showing Next charge: £0.00 and Today's charge: £0.00. In other words, the page the user sees agreed with the tampered numbers, not just the raw response.
Step 4: Attempt the transaction
The researcher could not complete the final transaction with a test credit card, because Stripe rejected it as fake. Stripe is a payment processor, a company that handles card payments on behalf of shops and websites. The backend logic, however, had fully accepted the manipulated amount up to that point.
Root cause: why it worked
The server takes the price from a parameter supplied by the client, amount, in the billing-info update request, instead of calculating it on the backend from the offer or product being purchased. The write-up states the server should verify the price on the backend based on the offer_hash or product ID. An offer hash is a code that identifies a particular offer, and a product ID is a code that identifies a particular product; either one lets the server look up the correct price in its own records.
Because the amount is trusted as received, changing it changes both the response totals and what the checkout UI displays. The UI is the user interface, the visible part of the site. The report does not describe any server-side check that rejected the tampered value; the request returned 200 with the modified amounts.
Impact: what could have gone wrong
This is a price manipulation and business logic flaw. An attacker could potentially downgrade the cost of any premium plan to $0.00, which would mean direct financial loss for the company. The write-up hedges this: the final transaction was not completed because the test card was rejected by Stripe, so the demonstrated result is that the backend and the checkout UI accept and display the manipulated amount, not a completed zero-cost subscription.
Fix: what should change
The report does not say what was changed. The recommendation it gives is that the server should never trust the client for calculating prices, and should always verify the price on the backend based on the offer_hash or product ID.
Variants to test
If you want to try this kind of testing yourself, these are variations in the same spirit. A positive result means the server accepts the tampered value.
- Intercept checkout and billing requests and modify parameters such as
amount,price,currencyanddiscount. A positive result is a 200 response whose totals match the tampered values and a checkout UI that displays them.
What the researcher took away
The write-up ends with three lessons. Payment flows are worth testing, because they handle money and small mistakes there are expensive. Business logic matters, because the server should never trust the client for calculating prices. And duplicates are part of the game: getting a duplicate on a high-impact bug means your method was correct, and the security team's confirmation is a win in itself.
Glossary
- API: a defined set of addresses and rules that one program uses to talk to another; here, the endpoints the browser calls to do things like update billing information.
- Array: an ordered list of values written between square brackets, such as
["0.00","139.95"]. - Backend: the part of a service that runs on the company's servers and does the real work, as opposed to the frontend in your browser.
- Bug bounty: a programme where a company pays or thanks people for reporting security flaws in its systems.
- Burp Repeater: a part of Burp Suite that lets you edit one captured request and send it again repeatedly.
- Burp Suite: a tool that sits between your browser and a website so you can pause, read and edit the traffic.
- Business logic: the rules a website follows about what is allowed, such as prices, limits and order of steps.
- Business logic flaw: a mistake in those rules, rather than in the low-level plumbing of the software.
- Checkout flow: the series of pages where a user picks a plan, enters payment details and confirms a purchase.
- Client: the program on the user's side, usually the browser, that sends requests to the server.
- Duplicate: a report of a flaw that someone else has already reported.
- Endpoint: a specific address on a server that accepts a particular kind of request.
- Frontend: the part of a service that runs in your browser and draws the pages you see.
- GET: a type of request that asks the server to show you something.
- HackerOne: a bug bounty platform where researchers report flaws and companies respond.
- Headers: extra labels attached to a request or response, such as the type of data or who is logged in.
- HTTP: the language browsers and servers use to exchange requests and responses.
- HTTP/2: a newer version of that language.
- Identifier: a short code that names something, such as a particular plan, so the server can look it up.
- Intercept: to catch a request before it reaches the server so you can read or change it.
- JSON: a common text format for structured data, using names in quotes, a colon and a value.
- Offer hash: a code that identifies a particular offer, which the server could use to look up the correct price.
- Parameter: a named piece of data in a request, such as
amount. - POST: a type of request that sends data to the server, usually to create or change something.
- Price manipulation: a flaw where a user can change the price of something they are buying.
- Product ID: a code that identifies a particular product, which the server could use to look up the correct price.
- Recurring charge: an amount billed again each period, for example every month, after a trial ends.
- Request: a message your browser sends to a server asking for something or telling it something.
- Request body: the part of a request that carries data, as opposed to the address and headers.
- Response: the server's reply to a request.
- SaaS: Software as a Service; software you use through a website that someone else runs, usually for a subscription.
- SEO: search engine optimisation, the work of making a website rank better in search results.
- Status code: a number in a response that says how the request went, such as 200 for success.
- Stripe: a payment processor that handles card payments on behalf of websites.
- Subscription: an arrangement where you pay regularly, for example monthly, to keep using a service.
- Trial: a period during which you can use paid features before being charged.
- UI: user interface, the visible part of a site that a person interacts with.