Skip to content
Business logic Write-up Beginner

How I Bought a £240.00 Annual Subscription for Bargain £0.01

The payment request included a package identifier that could be changed to any other valid package, including a test package priced at one penny. An attacker could buy an annual subscription for £0.01 instead of the normal £239.88.

Craig Hays Follow

Published on craighays.com

I found a way to alter a premium subscription service price and bought it for a penny. This is how I did it.

Craig Hays (@craighays), on craighays.com

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.

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

This is an account of a payment logic flaw found while hunting on a private SaaS bug bounty program. The product is a SaaS platform with a premium subscription service, sold through a web-based new user sign-up funnel that takes card payments. The subscription the researcher first attempted to buy was the platform's premium service at £19.99 per month.

Behind the sign-up form, the platform identifies what is being bought with a package_id value. In this case the value looked like target:payments:packages:1205. The package ID is the digital equivalent of a barcode SKU on the side of a box: the company can list multiple SKUs and switch between them in the sign-up form, which lets it change prices at any time without losing the ability to renew existing subscriptions at the previous price.

Setup

The work was done against a private SaaS bug bounty program, using Burp Suite (including Burp Suite Intruder and proxy intercept) to capture and replay the requests in the sign-up and payment flow. No special account or role is described: the researcher went through the ordinary new user sign-up funnel as a prospective customer.

The precondition is a target that takes payments. The researcher's habit on such targets is to try to buy something using a test credit card number, then read through every request and response in the whole process looking for anything interesting. When the payment fails (or succeeds), that traffic is the material to work from.

Finding it

Going through the new user sign-up funnel, the researcher entered a test card at the payment page. The payment failed, as expected, and the captured requests and responses were reviewed in Burp.

The request to buy with the credit card transaction token included this string:

Text
"package_id":"target:payments:packages:1205"

The response contained this string:

Text
"term":"monthly","price":{"amount":1999,"currency":"GBP"}

The amount was the monthly value of the subscription, £19.99 expressed in pence, and the response confirmed the subscription was monthly. What caught the researcher's attention was the numerical ID inside the package_id parameter. The question was whether other valid package IDs existed, and if so, what prices and payment terms they were linked to.

Exploitation

Step 1: Enumerate package IDs with Intruder

Using Burp Suite Intruder, the researcher repeated the failed payment request 10,000 times, starting from target:payments:packages:1 and incrementing the ID up to target:payments:packages:10000.

Many of the requests errored out with a "no package found" message, but hundreds of past and future prices were still listed in the pricing table. The most expensive was £49.99 on a monthly term. The cheapest was £0.01 on both a monthly and annual term. That gave a candidate: a package ID priced at £0.01 annually.

Step 2: Replay the purchase with a real card

The researcher went back through the web-based new user sign-up process and enabled Burp Suite proxy intercept just as the payment details were about to be entered. This time real credit card details were used, and the resulting requests were forwarded manually until the string "package_id":"target:payments:packages:1205" appeared again.

At that point the SKU 1205 was changed for the annual £0.01 SKU, the request was forwarded, and Burp Suite proxy intercept was switched off.

Step 3: Confirm the result

The payment worked. The researcher had bought a £239.88 annual subscription for a penny. Reviewing the account confirmed premium subscriber status, with a contract end date 12 months later.

Root cause

The payment request carried the package identifier as an editable value, and changing it to a valid penny SKU resulted in a completed purchase. The sign-up form selected a SKU, but the payment request carried that SKU as an editable value, and the server accepted whatever valid SKU the client presented. Because the penny SKUs were valid entries in the pricing table, a request naming one of them was processed like any other purchase.

It looks like the company created a monthly and an annual subscription SKU priced at £0.01 each so employees could test the live payment system after code deployments. Such penny SKUs are common, but they are not usually publicly visible or easy to guess and are reserved for employee usage. Here they were reachable by simple enumeration of sequential numeric IDs.

Impact

The flaw has the potential for a large financial impact in terms of lost revenue. If it became public knowledge, all existing customers could cancel their subscriptions and renew for £0.01, costing the target £239.87 per customer per year. New customers could sign up for a penny, losing all future revenue until the SKU is disabled. The 1p charge probably does not even cover the credit card transaction fee.

Fix

The recommended remediation keeps the ability for testers to test the payments system: add a third value to each SKU for Enabled, True or False. The team can enable the £0.01 SKUs for testing, make a purchase, then set them back to False in the application database so they cannot be abused.

The payment processing code would need to be updated to read the Enabled property from the database and cancel any transaction trying to use a disabled SKU, advising Stripe not to complete the payment for the presented token.

Variants to test

  1. Enumerate sequential package, product or plan identifiers on any checkout flow and compare the price and term returned for each.

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

A security researcher found a way to buy a premium subscription worth £239.88 for a single penny. The company that ran the service had left a special cheap price in its payment system, meant for its own staff to test payments, and the researcher discovered that anyone could use it.

To understand how, you need a little background. Many websites sell subscriptions: you sign up, enter your card details, and the site charges you every month or every year. Behind the sign-up page, the website has to tell its payment system exactly what you are buying. It does this by sending a short label, called an identifier, along with your card details. If that label can be changed by the person buying, and the payment system accepts the changed label, then the buyer can choose their own price.

That is what happened here. The researcher changed the label from the normal monthly package to a leftover one-penny test package, and the payment went through.

Photo by Polina Tankilevitch from Pexels From the original on craighays.com

Photo by Polina Tankilevitch from Pexels

The habit that found it

Whenever the researcher works on a website that takes payments, the first thing they do is try to buy something using a test credit card number. A test card number is a made-up number that card processors recognise as fake, so no real money moves. It is a safe way to walk through a checkout without spending anything.

Why bother? Because a checkout is a conversation between your browser and the company's server, and that conversation is full of useful information. When the payment fails (or even when it succeeds), the researcher reads through every message sent in both directions, looking for anything that seems interesting. Think of it like reading the receipts and order forms after a shopping trip, rather than just looking at what is in your bag.

To read those messages, the researcher uses a tool called Burp Suite. Burp Suite sits between your browser and the website, like a postal worker who opens every letter, reads it, and can even rewrite it before passing it on. This is called a proxy. It lets you pause a request, change part of it, and then send it on its way.

Spotting the number

While working on a private bug bounty program, the researcher went through the new user sign-up process and entered a test card at the payment page. A bug bounty program is a scheme where a company invites outside researchers to look for security problems in its systems, usually with rules about what is allowed and sometimes a reward for useful findings. This one was private, meaning only invited researchers could take part.

The payment failed, as expected with a test card. The researcher then went back through all the captured requests and responses. The subscription being bought was the platform's premium service at £19.99 per month.

One request, the one that sends the card transaction to the server to complete the purchase, contained this piece of text:

Text
"package_id":"target:payments:packages:1205"

Line by line, in plain words:

  • package_id is the name of a field. It means "which package is this?" A package here is simply a product or plan, such as "premium monthly".
  • The value after the colon is the answer: target:payments:packages:1205. This is a label made of words separated by colons, ending in the number 1205. The words are just a naming convention the company chose; the important part is the number at the end.
  • The whole thing is wrapped in double quotes because it is part of a larger block of data formatted in a style called JSON, which is a common way for computers to exchange structured information. You can think of JSON as a very strict shopping list: item name, then a colon, then the value.

The response from the server contained this:

Text
"term":"monthly","price":{"amount":1999,"currency":"GBP"}

Line by line:

  • "term":"monthly" says the subscription runs month by month.
  • "price" opens a small group of values about money.
  • "amount":1999 is the price in pence, not pounds. 1999 pence is £19.99. Payment systems often store money as whole numbers of the smallest unit to avoid rounding mistakes with decimals.
  • "currency":"GBP" says the currency is British pounds.

So the server confirmed: this package is the monthly plan at £19.99. Nothing wrong so far. But the researcher noticed the number 1205 inside the package identifier. A number like that is a strong hint. It suggests the company has a list of packages, numbered one after another, and 1205 is just one entry in that list. If there are 1205, there are probably 1, 2, 3 and so on. And if there are other entries, what prices and terms are attached to them?

This is the key idea of the whole finding: whenever you see a simple number that identifies something, ask what happens if you change it. Security people often call this kind of flaw an insecure direct object reference, or IDOR for short. The everyday comparison is a hotel where your room key is just the room number written on a card: if the door only checks the number and not whether the card belongs to you, you can write a different number and open someone else's door.

Trying thousands of numbers

To answer that question, the researcher used a part of Burp Suite called Intruder. Intruder takes one request and sends it many times, each time with a different value in a chosen spot. It is like a photocopier that changes one word on each copy.

The researcher repeated the failed payment request 10,000 times, starting from target:payments:packages:1 and counting up to target:payments:packages:10000. In other words, the number at the end of the label was replaced with 1, then 2, then 3, all the way to 10,000.

Why do this? Because if the server answers differently for a real package than for a made-up one, the answers themselves tell you which numbers exist. You do not need to guess; you just listen to which numbers get a proper reply.

Many of the requests came back with a "no package found" message. That is the server saying "there is nothing here with that number". But hundreds of the numbers did exist, and they returned past and future prices that were still listed in the company's pricing table. The most expensive was £49.99 on a monthly term. The cheapest was £0.01 on both a monthly and annual term.

A one-penny package, available monthly and annually. That was the opening. The next question was whether a real payment using that package would actually go through, and whether it would create a real subscription.

Paying a penny for a year

Now the researcher went back through the sign-up process, this time with a real credit card. Just as the payment details were about to be entered, Burp Suite's proxy intercept was switched on. Intercept means Burp pauses each request before it leaves your browser, so you can look at it and edit it before letting it continue.

The researcher filled in the form and manually forwarded each request, one at a time, until the familiar string appeared again:

Text
"package_id":"target:payments:packages:1205"

At that moment, the number 1205 was replaced with the number of the annual one-penny package. The request was then forwarded, and intercept was switched off.

Why use a real card this time? Because the goal was to prove the flaw end to end: not just that a cheap package existed, but that the payment system would accept it and grant a real subscription.

To the researcher's surprise, it worked. A £239.88 annual subscription had been bought for one penny. Going back into the account and reviewing the subscription confirmed premium subscriber status, with a contract end date 12 months later.

Why companies keep test packages

craighays.com barcode sku
craighays.com barcode sku From the original on craighays.com

The package identifier works like a barcode SKU on the side of a box. SKU stands for stock-keeping unit: it is the short code a shop uses to tell one product from another, so that scanning it at the till brings up the right name and price. In the same way, the company can list several packages and have the sign-up form switch between them. That lets it change prices at any time without losing the ability to renew existing subscriptions at the old price. Customers who signed up earlier keep renewing on their original package, while new customers get the new one.

In this case, it looks like the company created a monthly and an annual subscription package priced at £0.01 each, so that employees could test the live payment system after code deployments. A deployment is when new code is put live on the website. Testing payments after a deployment makes sense: you want to know that real money can still be taken before customers try.

Penny packages like this are common. What is not common is for them to be publicly visible or easy to guess. They are meant for staff use only. Here, they were reachable simply by trying numbers in order.

What it could have cost

The flaw had the potential for a big financial impact in terms of lost revenue. If it became public knowledge, all of the company's existing customers could cancel their subscriptions and renew for £0.01, costing the company £239.87 per customer per year. New customers could sign up for a penny, losing all future revenue until the package is disabled. The one-penny charge probably does not even cover the credit card transaction fee, which is the small amount the card processor charges the company for handling each payment.

How to fix it

The recommended fix keeps the ability for testers to test the payments system. Add a third value to each package for Enabled, set to True or False. That way, the team can switch the £0.01 packages on for testing, make a purchase, then set them back to False in the application database so they cannot be abused by people like the researcher.

The payment processing code would need to be updated to read the Enabled value from the database and cancel any transaction trying to use a disabled package, advising Stripe not to complete the payment for the presented token. Stripe is a payment provider: a company that handles card payments on behalf of websites. A token is a short stand-in value that represents a card or a payment, so the real card number does not have to be passed around everywhere.

Other places to look for the same thing

Glossary

  • API: the set of addresses and rules a website uses to talk to other software, so one program can ask another to do something, such as take a payment.
  • Bug bounty program: a scheme where a company invites outside researchers to look for security problems in its systems, usually under rules and sometimes with a reward.
  • Burp Suite: a tool that sits between your browser and a website, letting you read, pause and change the messages going back and forth.
  • Burp Suite Intruder: the part of Burp Suite that sends one request many times, each with a different value in a chosen spot.
  • Cookie: a small piece of data a website stores in your browser so it can recognise you on later requests, for example to keep you logged in.
  • Deployment: the act of putting new code live on a website.
  • Endpoint: the specific address on a server that handles a particular action.
  • IDOR (insecure direct object reference): a flaw where a system identifies something by a simple value, such as a number, and does not check that the person asking is allowed to use it.
  • Identifier: a label or number that names a specific thing, such as a package or a user.
  • JSON: a common text format for structured data, made of names, colons and values in quotes and brackets.
  • Package: in this report, a product or plan that can be bought, such as a monthly or annual subscription.
  • Package ID: the label the website sends to say which package is being bought.
  • Payment logic flaw: a mistake in the rules of a payment process, rather than in encryption or passwords, that lets someone do something the business did not intend, such as choosing their own price.
  • Premium subscription: a paid level of service that gives more features than the free level.
  • Proxy: a tool or server that sits between two parties and passes messages between them, optionally letting you read or change them.
  • Proxy intercept: a Burp Suite setting that pauses each request so you can inspect and edit it before it continues.
  • Request: a message your browser sends to a server asking it to do something.
  • Response: the message a server sends back after a request.
  • SaaS: software as a service, meaning software you use over the internet through a browser rather than installing it on your own computer.
  • SKU (stock-keeping unit): a short code a shop uses to tell one product from another and look up its price.
  • Stripe: a payment provider that handles card payments on behalf of websites.
  • Test credit card number: a made-up card number that card processors recognise as fake, used to walk through a checkout without spending money.
  • Token: a short stand-in value that represents something sensitive, such as a card or a payment, so the real details do not have to be passed around everywhere.
  • Transaction: a single payment attempt or completed payment.

More by Craig Hays

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.