Skip to content
Business logic Write-up Intermediate

Business Logic Flaw — Users Can Manipulate Their Own Subscripti

An API endpoint allowed authenticated users to set their own pricing experiment variant, which then determined the price shown in Stripe checkout. An attacker could set the lowest price tier and generate a checkout session at that reduced price.

Divakarvasani Follow

Published on medium.com

I was methodically testing every API endpoint I’d extracted from the application’s JavaScript bundle. I had mapped around 60+ routes by parsing the 2.7MB JS file:

Divakarvasani, 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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the pricing experiment variant was stored client-side and not validated server-side, allowing users to set their own price tier.

Impact

An attacker could reduce the price they pay for a subscription, potentially combined with leaked promo codes for further discounts; no rate limiting allowed generating many checkout sessions.

What the attacker needed

Authenticated user account; access to the organisation's API

The fix

The experiment variant should be assigned server-side and stored immutably, and the server should validate the price against a server-side assignment before creating a checkout session.

How it was found

  1. Send a request with an invalid variant value to trigger a validation error that lists all valid pricing tiers.
  2. Send a request with a valid variant value (e.g., 40) to set the user's pricing tier.
  3. Create a checkout session and observe that the Stripe checkout page shows the manipulated price.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A company ran a test to show different prices to different users. The system let users choose which price they got by sending a simple request. This meant anyone could pick the cheapest price and pay less than intended.

What is Business logic?

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

More by Divakarvasani

View all

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