Large Pizza, Small Price: Exploiting a Critical Business Logic Fl
The server trusted client-supplied product codes to determine pizza size and modifier pricing, so an attacker could swap a small pizza code for a large one while keeping small-tier modifier prices. This allowed buying a large pizza with premium toppings at the small pizza price.
During testing of a private bug bounty program, I identified a critical business logic vulnerability in an online pizza ordering workflow.
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
The server did not validate the relationship between the pizza size code, the modifier price tier, and the recalculated total, relying on client-supplied codes for pricing.
Impact
Attackers could systematically underpay for high-margin items, causing direct revenue loss and potentially automating large-scale abuse, with no authentication required.
What the attacker needed
No authentication required; ability to intercept and modify HTTP requests
The fix
The server should validate product codes against server-side catalog logic, recalculate totals independently, and reject inconsistent product-modifier combinations.
How it was found
- Select a small pizza and add multiple premium modifiers, then add to cart.
- Intercept the add-to-cart request.
- Replace the small pizza code with the large pizza code, leaving modifier codes unchanged.
- Forward the request and complete checkout.
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.
When you order online, your browser sends details like which pizza and toppings you want. The server should check that the price it calculates matches the actual items, but here it simply trusted the codes sent by the browser. By changing one code from 'small' to 'large' without changing the topping codes, the attacker got a bigger pizza for less money.
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.