# Price and Quantity Manipulation > A business logic flaw where the server trusts or fails to bound client-influenced monetary and numeric values (price, total, quantity, amount), so the charge it computes no longer reflects the real order. ## How it works The root cause is one of two server mistakes: it **accepts a value it should derive** (price, total), or it **derives from a value it never bounds** (quantity, amount). | Pattern | Server mistake | Reported outcome | |---|---|---| | Trusted total | Uses a client-supplied total instead of recomputing from the catalog | $100 item settled for a fraction of the price ([[raw/medium.com/top-bugs-that-actually-paid-bounties-in-2025-4666\|Top bugs that paid]]) | | Off-menu quantity | Price keyed to fixed quantity tiers; an unlisted quantity gets no price | Subtotal of zero, only shipping and tax charged ([[raw/infosecwriteups.com/i-almost-ordered-a-product-for-free-business-logic-vulnerability-9541\|I almost ordered a product for free]]) | | Negative values | No `> 0` check on quantity or amount | Negative totals, credits, or corrupted ledgers ([[raw/infosecwriteups.com/i-pentested-a-real-crm-system-and-found-4-critical-vulnerabilities-her-9518\|CRM pentest]]) | | Integer overflow / cast | Quantity beyond the 32-bit signed range wraps or is cast to 0 | Order total of 0 ([[raw/infosecwriteups.com/how-an-integer-overflow-vulnerability-let-me-buy-anything-for-0-11940\|Integer overflow, ₹0]]) | | Exposed pricing operation | Pricing and refund mutations reachable without authorization | `priceOverride`, `refundIssue` callable from an anonymous session ([[raw/wiz.io/the-red-agent-pov-exploiting-broken-object-level-authorization-in-an-a-9944\|Red Agent: airline BOLA]]) | - Business logic is code that mimics real-world business decisions. Testing it means challenging the developer's assumptions about how users behave, not hunting parsing bugs ([[raw/tib3rius.com/web-appsec-interview-questions-5906|Web AppSec Interview Questions]]). - OWASP WSTG covers this under WSTG-BUSL. Its main examples are price manipulation and payment-flow bypass ([[raw/haxoris.com/wstg-methodology-web-penetration-testing-haxoris-2721|WSTG methodology]]). - A disabled button in the UI is not enforcement. In the money-envelopes case, the only thing blocking checkout of the inconsistent order was a client-side CSS state ([[raw/infosecwriteups.com/i-almost-ordered-a-product-for-free-business-logic-vulnerability-9541|I almost ordered a product for free]]). - [[Mass Assignment]] is the same failure on the write side: writable attributes can add balance or assign negative resources ([[raw/tib3rius.com/web-appsec-interview-questions-5906|Web AppSec Interview Questions]]). ## Testing heuristics - Map every request in the cart, checkout and payment chain, and note which fields carry money or counts. Cart endpoints that add items, update quantities or apply discount codes are where price manipulation and coupon fraud happen ([[raw/tencentcloud.com/protecting-payment-cart-and-login-endpoints-at-the-edge-3026|Protecting Payment, Cart, and Login Endpoints]]). - Use boundary classes rather than random fuzzing: zero, negative, fractional, very large, values not offered in the UI, and wrong types ([[raw/infosecwriteups.com/mastery-hunt-hidden-api-endpoints-a-deep-dive-into-api-bug-bounty-reco-9391|Mastery Hunt: Hidden API Endpoints]], [[raw/github.com/api-penetration-testing-combined-checklist-scenario-list-2888|API pentest checklist]], [[raw/nflo.tech/api-penetration-testing-complete-guide-4321|API Penetration Testing guide]]). - Read the response. If a tampered price is ignored but a tampered quantity sticks, the server is deriving price from quantity, so attack the derivation instead ([[raw/infosecwriteups.com/i-almost-ordered-a-product-for-free-business-logic-vulnerability-9541|money-envelopes case]]). - Confirm what actually persisted (the order total, the payment-provider amount, the ledger entry), not what the UI shows. - Hunters who specialise in logic bugs describe the habit as "do the opposite of what the flow expects", including ordering with negative values ([[raw/intigriti.com/marketer-by-day-bug-hunter-by-night-interview-with-stefan-goossens-g00-8576|Interview with Stefan Goossens]]). Beginner roadmaps and bug bounty checklists list price manipulation and negative quantities as standard checks ([[raw/netlas.io/bug-bounty-101-complete-roadmap-for-beginners-2026-3609|Bug Bounty 101]], [[raw/dev.to/bug-bounty-hunting-in-2026-dev-community-3605|Bug Bounty Hunting in 2026]], [[raw/redfoxsec.com/common-bug-bounty-vulnerabilities-a-technical-deep-dive-for-hunters-in-4902|Common Bug Bounty Vulnerabilities]]). ## Notable cases - An e-commerce checkout trusted a client-side total that included gift wrap and tax. The author reports a $4,200 payout for this checkout flaw ([[raw/medium.com/top-bugs-that-actually-paid-bounties-in-2025-4666|Top bugs that paid]]). - An integer overflow on quantity produced a ₹0 cart on a large e-commerce platform ([[raw/infosecwriteups.com/how-an-integer-overflow-vulnerability-let-me-buy-anything-for-0-11940|Integer overflow, ₹0]]). - Off-menu quantity: ~Rs. 4,177 of goods for Rs. 177 ([[raw/infosecwriteups.com/i-almost-ordered-a-product-for-free-business-logic-vulnerability-9541|money-envelopes]]). - A CRM payments table held records with amounts of -99999 and -3000 marked `paid`. This was rated CWE-840, CVSS 6.5 ([[raw/infosecwriteups.com/i-pentested-a-real-crm-system-and-found-4-critical-vulnerabilities-her-9518|CRM pentest]]). - In an airline GraphQL API, the price-override and refund mutations sat behind broken object-level authorization ([[raw/wiz.io/the-red-agent-pov-exploiting-broken-object-level-authorization-in-an-a-9944|Red Agent: airline BOLA]]). - Intigriti's October 2026 CTF was a deliberately vulnerable store built around price manipulation ([[raw/intigriti.com/intigriti-bug-bytes-241-october-2026-12442|Bug Bytes #241]]). ## Defenses - Recompute every price, discount and total on the server from authoritative catalog and order state. Treat client totals as display-only ([[raw/medium.com/top-bugs-that-actually-paid-bounties-in-2025-4666|Top bugs that paid]]). - Enforce explicit bounds (`amount > 0`, quantity within an allowed set or range) and use overflow-safe arithmetic and types ([[raw/infosecwriteups.com/how-an-integer-overflow-vulnerability-let-me-buy-anything-for-0-11940|Integer overflow, ₹0]], [[raw/infosecwriteups.com/i-pentested-a-real-crm-system-and-found-4-critical-vulnerabilities-her-9518|CRM pentest]]). - Reject a line item that has no resolvable price instead of defaulting it to zero. - Allowlist writable fields so price, balance and credit can't be bound from request bodies ([[Mass Assignment]]). - Put pricing, override and refund operations behind function-level authorization ([[Function Level Authorization]]). ## Related - [[Business Logic Vulnerabilities]] (main guide) - [[Coupon and Reward Abuse]] · [[Workflow and State Bypass]] · [[Paywall and Entitlement Bypass]] - [[Mass Assignment]] · [[Race Conditions]] · [[BOLA in APIs]] · [[GraphQL Authorization Flaws]] ## Sources - [[raw/infosecwriteups.com/i-almost-ordered-a-product-for-free-business-logic-vulnerability-9541|I almost ordered a product for free. (Business Logic Vulnerability)]] - [[raw/infosecwriteups.com/how-an-integer-overflow-vulnerability-let-me-buy-anything-for-0-11940|How an Integer Overflow Vulnerability Let Me Buy Anything for ₹0]] - [[raw/medium.com/top-bugs-that-actually-paid-bounties-in-2025-4666|Top Bugs That Actually Paid Bounties in 2025]] - [[raw/infosecwriteups.com/i-pentested-a-real-crm-system-and-found-4-critical-vulnerabilities-her-9518|I Pentested a Real CRM System and Found 4 Critical Vulnerabilities]] - [[raw/wiz.io/the-red-agent-pov-exploiting-broken-object-level-authorization-in-an-a-9944|The Red Agent POV: Exploiting BOLA in an Airline GraphQL API]] - [[raw/tib3rius.com/web-appsec-interview-questions-5906|Web AppSec Interview Questions]] - [[raw/haxoris.com/wstg-methodology-web-penetration-testing-haxoris-2721|WSTG Methodology: Web Penetration Testing]] - [[raw/tencentcloud.com/protecting-payment-cart-and-login-endpoints-at-the-edge-3026|Protecting Payment, Cart, and Login Endpoints at the Edge]] - [[raw/infosecwriteups.com/mastery-hunt-hidden-api-endpoints-a-deep-dive-into-api-bug-bounty-reco-9391|Mastery Hunt: Hidden API Endpoints]] - [[raw/github.com/api-penetration-testing-combined-checklist-scenario-list-2888|API Penetration Testing Combined Checklist]] - [[raw/nflo.tech/api-penetration-testing-complete-guide-4321|API Penetration Testing: Complete Guide]] - [[raw/intigriti.com/marketer-by-day-bug-hunter-by-night-interview-with-stefan-goossens-g00-8576|Interview with Stefan Goossens (G0053)]] - [[raw/netlas.io/bug-bounty-101-complete-roadmap-for-beginners-2026-3609|Bug Bounty 101: Complete Roadmap for Beginners (2026)]] - [[raw/intigriti.com/intigriti-bug-bytes-241-october-2026-12442|Intigriti Bug Bytes #241 - October 2026]] - [[raw/dev.to/bug-bounty-hunting-in-2026-dev-community-3605|Bug Bounty Hunting in 2026]] - [[raw/redfoxsec.com/common-bug-bounty-vulnerabilities-a-technical-deep-dive-for-hunters-in-4902|Common Bug Bounty Vulnerabilities: A Technical Deep Dive]]