Skip to content
Business logic Write-up Beginner

New features means new bugs

A new feature allowed anyone to purchase ads for any company without being a member, and after purchasing ads the user was granted ownership of that company. The purchase could be completed using a sandbox credit card number, so an attacker could take over any company page at zero cost.

zseano Follow

Published on medium.com

Sean (zseano)

Sean (zseano), on medium.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

The target was a website that let users claim ownership of a company's page, but only after verifying their identity by uploading an ID document. The researcher describes that verification flow as simple and straightforward, and on first inspection reasonably secure. The goal he was chasing was admin rights over a company page, and the ID check stood in the way.

After a long period of testing the ID feature without finding anything interesting, a new feature arrived: page owners could now publish ads. That feature is where the bug lived.

Setup

There is no tooling, account structure or version information in the report beyond the following:

  1. A user account on the site, able to reach the ID verification flow.
  2. Access to the new ad purchasing feature once it was released.
  3. A sandbox credit card number, 4111 1111 1111 1111, used for the purchase.

The researcher notes he would have continued with a real card if the sandbox number had failed, provided the cost was low, and recommends keeping a separate card for bug bounty transactions.

Finding it

Testing the ID upload produced nothing: no interesting behaviour when uploading the ID, and no route to admin rights over a company. The researcher moved on from that feature for a long period.

When the ad publishing feature shipped, he started testing it immediately. Two problems stood out:

  1. Anyone could purchase ads for any company. The flow did not require the user to be a member of the company first.
  2. Purchasing ads granted ownership of the company. Completing the purchase for a chosen company gave the buyer ownership of that company's page.
From the original on medium.com

The image sits at the point in the story where the new ad feature is introduced, just before the researcher starts testing it.

Exploitation

Step 1: select a target company

Open the ad purchasing feature and pick any company from the drop down box. No membership of that company is required, and no ID verification has been performed.

Step 2: purchase ads with a sandbox card

The second problem was that sandbox credit card details were accepted when purchasing ads. The number used was:

Text
4111 1111 1111 1111

The report states sandbox credit card details worked when purchasing ads, so the purchase cost nothing real. The report does not include the request or response for the purchase.

Step 3: receive ownership

Completing the purchase granted ownership of the chosen company. The researcher notes the ads still ran as well.

Step 4: use the admin rights

With ownership in hand, the researcher had access to do everything on the page: edit or remove the page, remove other admins, and browse their information.

Root cause

The report says new features designed to generate revenue can be rushed, with not enough thought given to implementing them securely in the main web app. The ad purchase flow let anyone buy ads for any company without being a member of it, and completing the purchase then granted ownership. Because the purchase then conferred ownership, the payment step effectively replaced the ID verification process.

Two gaps combined to make it free and repeatable:

  1. No authorisation check tying the buyer to the selected company before purchase.
  2. No validation that the card was a real payment instrument, so a sandbox number was accepted.

The new feature undermined the entire identification process and allowed claiming ownership of any page by purchasing ads with a sandbox card. The report does not describe the underlying code or the exact mechanism.

Impact

An attacker could choose any company's page from the drop down, purchase ads using a sandbox card number, and obtain admin rights over that company at zero cost. From there the attacker could edit or remove the page, remove other admins, and browse their information. The report does not state how many companies were exposed or whether the issue was fixed, and gives no bounty figure.

Fix

Based on the described behaviour, the fixes would be to require membership of a company before ads can be purchased for it, to stop granting ownership as a side effect of an ad purchase, and to reject sandbox card numbers in production payment flows.

Variants to test

  1. Privilege granted by a paid action. Look for any feature where completing a payment or subscription changes a role or grants ownership. A positive result is a role change on an object the account had no prior relationship with.
  2. Object selection without a membership check. In flows with a drop down or ID parameter for choosing an organisation, try selecting one the account does not belong to. A positive result is the flow proceeding to payment or completion rather than rejecting the selection.
  3. Sandbox or test payment credentials in production. Try well known test card numbers on live payment forms. A positive result is a successful purchase with no real charge.
  4. New features as a route around old controls. When a product ships a new revenue feature, map which existing privileges it touches. A positive result is a new path to an old protected action, such as ownership or admin access, that skips the original verification step.

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. 8 min read.

What happened, in plain words

A website let people claim a company's page, but only after they proved who they were by uploading a photo of an ID document. The researcher wanted admin rights over a company page, and that ID check was the wall in the way. He tested the upload feature for a long time and found nothing: the upload behaved normally and there was no way through to admin rights. So he moved on.

Later the site added a new feature: page owners could now buy ads. He started testing it straight away and found two problems. First, anyone could buy ads for any company, without being a member of that company; you just picked a company from a drop down list. Second, finishing that purchase gave you ownership of the company. On top of that, the payment form accepted a sandbox credit card number, a fake number used for testing, so the purchase cost nothing real. Put together, an attacker could pick any company, buy ads with a fake card, and end up as an admin of that company for free. The ads still ran as well.

The important lesson is that a new revenue feature undermined the entire identification process, because buying ads handed out ownership without the ID check.

The target and the feature

What the site did

The site hosted pages for companies. Each company page had people who could manage it, and the highest level of control is what we call admin rights: the ability to change everything about that page. To stop just anyone claiming a company, the site asked you to prove your identity first by uploading an ID document. This is called ID verification, and it is the same idea as showing your passport at a bank counter before they let you open an account in a company's name.

The researcher describes that verification flow as simple and straightforward, and on first inspection reasonably secure. He spent a long period testing it, uploading his ID and looking for a way to gain admin rights over a company, and found nothing interesting. There was no odd behaviour on upload and no route to admin rights.

The new feature

Then a new feature arrived: page owners could publish ads. Ads are paid promotion, so this feature was built to generate revenue for the company. New revenue features are often rushed, and the more products a company has planned, the heavier the workload and the more mistakes get made. That is the setting for this bug.

From the original on medium.com

The image appears at the moment the new ad feature is introduced, just before the researcher starts testing it.

Finding it

He began testing the ad feature immediately, and two problems stood out:

  1. Anyone could buy ads for any company. The flow never asked whether you were a member of the company. You simply chose a company from a drop down box that listed companies.
  2. Buying ads gave you ownership of the company. Completing the purchase for a chosen company handed the buyer ownership of that company's page.

A drop down box is just a list of options on a web page. The fact that the flow let anyone purchase ads for any company is the first sign of a missing check. In security terms, a check that confirms you are allowed to do something is called an authorisation check, and here the check tying the buyer to the chosen company was absent.

Exploitation

Step 1: select a target company

Open the ad purchasing feature and pick any company from the drop down box. No membership of that company is required, and no ID verification has been performed. This step matters because it shows the flow lets you name a company you have no proven link to; normally a system should refuse that selection outright.

Step 2: purchase ads with a sandbox card

The second problem was that sandbox credit card details were accepted when buying ads. The number used was:

Text
4111 1111 1111 1111

The report states sandbox credit card details were accepted when purchasing ads. A sandbox is a test environment, a practice version of a system where fake data is used so nobody is charged. A sandbox card number is a made up number that payment test systems accept. Because the live site accepted it, the purchase cost nothing real. The report does not include the request or response for the purchase.

Step 3: receive ownership

Completing the purchase granted ownership of the chosen company. The researcher notes the ads still ran as well, so the site behaved as if a genuine ad purchase had happened.

Step 4: use the admin rights

With ownership in hand, he had access to do everything on the page: edit or remove the page, remove other admins, and browse their information. This is the payoff. The goal he had been chasing through the ID upload was reached through a completely different door.

Why it worked

The report frames this as a design mistake rather than a coding slip. A new feature built to generate revenue was rushed, and not enough thought went into how it would fit with the existing ownership and identification model. The ad purchase flow let anyone buy ads for any company without being a member of it, and completing the purchase then granted ownership. Because the purchase then conferred ownership, the payment step effectively replaced the ID verification process.

Two gaps combined to make it free and repeatable:

  1. No authorisation check tying the buyer to the selected company before purchase.
  2. No validation that the card was a real payment instrument, so a sandbox number was accepted.

The new feature undermined the entire identification process and allowed claiming ownership of any page by purchasing ads with a sandbox card. The report does not describe the underlying code or the exact mechanism.

This kind of flaw, where the system lets you do something you should not be allowed to do because a permission check is missing or wrong, is often called a logic flaw or a broken authorisation issue. It is not a crash or a strange error message; the site works exactly as written, and that is the problem.

Impact

An attacker could choose any company's page from the drop down, buy ads using a sandbox card number, and obtain admin rights over that company at zero cost. From there the attacker could edit or remove the page, remove other admins, and browse their information. The report does not state how many companies were exposed or whether the issue was fixed, and gives no bounty figure.

Fix

Based on the described behaviour, the fixes would be to require membership of a company before ads can be bought for it, to stop granting ownership as a side effect of an ad purchase, and to reject sandbox card numbers in production payment flows.

Variants to test

These are the same ideas applied elsewhere, useful when you are learning:

  1. Privilege granted by a paid action. Look for any feature where completing a payment or subscription changes a role or grants ownership. A positive result is a role change on an object the account had no prior relationship with.
  2. Object selection without a membership check. In flows with a drop down or ID parameter for choosing an organisation, try selecting one the account does not belong to. A positive result is the flow proceeding to payment or completion rather than rejecting the selection.
  3. Sandbox or test payment credentials in production. Try well known test card numbers on live payment forms. A positive result is a successful purchase with no real charge.
  4. New features as a route around old controls. When a product ships a new revenue feature, map which existing privileges it touches. A positive result is a new path to an old protected action, such as ownership or admin access, that skips the original verification step.

The researcher's own advice: developers should not rush things and should think it through when implementing new features. Testers should always watch for new features, follow the company on social media, read news about upcoming releases weekly, and not be afraid to spend a little money when testing, though not a lot. He recommends a separate card used just for bug bounty transactions. If the sandbox card test had failed he would have continued with a real card just to see what would happen, as long as the cost was low.

Glossary

  • Admin rights: the highest level of control over a page or account, allowing changes to settings, content and other users.
  • Authorisation check: a check that confirms a user is allowed to perform an action or access an object, as opposed to authentication, which confirms who the user is.
  • Broken authorisation: a flaw where the system fails to correctly check whether a user is permitted to do something.
  • Bug bounty: a programme where a company pays researchers for reporting security problems in its systems.
  • Drop down box: a list of options on a web page from which the user picks one.
  • ID verification: a process where a user proves their identity, here by uploading an ID document.
  • Logic flaw: a bug where the system behaves as coded but the coded behaviour is wrong from a security point of view, often a missing or incorrect check.
  • Ownership: the state of being the account or person in control of a page, which usually comes with admin rights.
  • Payment integration: the part of a website that talks to a payment provider to take card payments.
  • Privilege: a permission to do something, such as edit a page or remove another admin.
  • Production: the live version of a site that real users and real money touch, as opposed to a test environment.
  • Revenue feature: a product feature built to make money for the company, such as selling ads.
  • Sandbox: a test environment or test mode where fake data is used so nobody is charged.
  • Sandbox card number: a made up card number that test payment systems accept, such as 4111 1111 1111 1111.
  • Test mode: a setting on a payment integration that accepts test cards instead of real ones.

More by zseano

View all

10 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.