Business Logic Vulnerabilities
Flaws where every request is well-formed and the server does exactly what it is asked, but it should never have honoured the request, because a business rule (price, quota, order of steps, entitlement) was assumed rather than enforced. CWE-840.
What it is
- Business logic is code that models real-world business decisions. Testing it means challenging the developer’s assumptions about how people use the application, not finding data-handling oversights. Because it depends on what the application is for, scanners can’t find it (Web AppSec Interview Questions).
- These bugs live in the gap between what the application is supposed to allow and what it actually enforces. Nothing is malformed, so there’s no signature (Red Agent: one boolean).
- The trust boundary that breaks is client-side intent vs. server-side invariant. The server trusts something the client controls: a total, a flag, the order of steps, the count of redemptions. It also assumes API consumers follow the documented directions (API Exploitation for Bug Bounty).
- Broken access control and BOLA are themselves described as logic flaws, a semantic gap that SAST and DAST can’t close (Why BAC dominates). The two classes overlap heavily, see Broken Access Control.
- OWASP coverage: WSTG-BUSL in the web testing guide (WSTG methodology). In the API Top 10, API6:2023 Unrestricted Access to Sensitive Business Flows was added in 2023 and can exist without any implementation bug (OWASP API Security Project, Salt: API Top 10 explained). The 2023 update is read as a shift toward business-logic and workflow abuse (Wiz: API Top 10).
Why it matters
- Impact is direct financial loss or data at scale: goods for ₹0, refunds issued to attackers, unauthorized funds transfers, paywalled data for 600M+ profiles (Integer overflow, ₹0, Salt: fintech GraphQL, Red Agent: one boolean).
- Severity comes from business impact, not CVSS. A technically trivial IDOR on order settlement paid as a $12,500 P1 (The $0 IDOR worth a $12,500 P1). Hunters who go deep on payment races, tenant isolation and subscription logic report $5K–$50K+ payouts (Backend Mastery).
- Low duplicate rates. Each instance is specific to its app and hard to automate, so these bugs pay well (Top bugs that paid).
- AI shifts who finds them. Autonomous agents now find intent-based bugs by reasoning about the business model (Red Agent: one boolean). LLM agents with refund or discount authority are a new place for logic abuse (Hacking AI customer service agents).
- Logic-only exploitation reaches beyond web apps: Orange Tsai built a full Microsoft Edge chain from logic bugs alone (Bug Bytes #241, Edge full chain with logic bugs only).
How it works
Four families cover most cases. Each has its own page:
| Family | Invariant broken | Page |
|---|---|---|
| Value tampering | Server derives price and total, and bounds quantity and amount | Price and Quantity Manipulation |
| Flow tampering | Steps happen in order and state matches the step | Workflow and State Bypass |
| Quota tampering | Incentives are redeemed once, within value, by real users | Coupon and Reward Abuse |
| Entitlement tampering | Plan, credit and quota checked on the server per request | Paywall and Entitlement Bypass |
Cross-cutting enablers, owned elsewhere:
- Concurrency. Check-then-act on balances, coupons and withdrawals (Race Conditions). One exchange example is a withdrawal that checks the balance and then debits it in a separate operation (Bitvulnex).
- Over-posting. Writable
role, balance or credit fields (Mass Assignment, Web AppSec Interview Questions). - Object references. Business actions applied to someone else’s account (Second-Order and Multi-Step IDOR, Payment extension API).
- Automation at scale. Legitimate flows abused in volume (API6) (API Rate Limiting).
Where to find it
- Commerce: add-to-cart, quantity update, discount code, checkout and payment-intent endpoints (Protecting Payment, Cart, and Login Endpoints).
- Money movement: transfers, withdrawals, refunds, payment plans, staking rewards, internal transfers that should respect limits (Bitvulnex, Salt: fintech GraphQL).
- Incentives: coupons, gift cards, referral bonuses, loyalty points, lotteries (NahamSec 2025, Civic reward backend).
- Identity flows: registration, email verification, 2FA, email change, password reset (Email verification bypass, 7 ways of bypassing 2FA).
- Plans and quotas: tiers, credits, trial limits, upload and creation limits (Premium feature bypass).
- Seams: sibling subdomains sharing a database, mobile vs. web vs. API, third-party integrations (Data deletion via subdomain sync).
- APIs in general. APIs expose business logic directly, with no UI hiding functions (API Pentesting guide).
How to test
Methodology:
- Learn the business. Know what the app sells, gates and protects, and read the developer documentation for stated rules and role matrices (Data deletion via subdomain sync, API Exploitation for Bug Bounty).
- Use the app as a normal user through a proxy and capture every request in each flow (Bug Bounty 101).
- Write down the invariants each flow should preserve, then test whether they survive concurrent requests or an alternate path (Bitvulnex).
- Attack the assumptions: what if this happens twice at once, out of order, from another channel, or after the state changed (Backend Mastery)? “They want me to do this, so what if I do the opposite?” (Interview with Stefan Goossens).
- Mine the client for parameters, routes and flags the UI never sends (Red Agent: one boolean, JavaScript Analysis).
- Verify the persisted effect (order total, ledger, account state), not the UI or a
200(Payment extension API). - Report in business terms: money, records and workflows affected (The $0 IDOR worth a $12,500 P1).
Checklist (Bug Bounty Hunting in 2026, Common Bug Bounty Vulnerabilities, API pentest checklist, Mastery Hunt):
- Monetary and count fields: zero, negative, fractional, oversized, off-menu values
- Is any total or price accepted from the client?
- Can steps (verification, 2FA, payment) be skipped or reordered?
- Can flow-binding attributes change after a step is issued?
- Are single-use items (coupon, gift card, token) redeemable concurrently or across channels?
- Do discounts stack?
- Is each plan, credit and quota limit enforced by the API for a free account with no UI tampering?
- Is every action permitted by the same role matrix on every surface?
- Do role or ownership changes take effect immediately (API Pentesting guide)?
- Can sensitive flows be automated at volume (API6)?
Exploitation and escalation
- Chaining with authorization. Logic plus IDOR turns a self-only flaw into an attack on other customers, e.g. billing changes or funds transfers on other accounts (Payment extension API, Salt: fintech GraphQL). See Vulnerability Chaining.
- Chaining with concurrency. Races raise the severity of logic flaws and the reverse (NahamSec 2025). Example: a login-flow race giving ATO (Race condition auth bypass, Account Takeover).
- Chaining across bug classes. A logic limit bypass in an upload form was paired with stored XSS that fired in an admin’s browser ($3,500 upload bug).
- Scale. Shared multi-tenant backends turn one flaw into every tenant’s problem (Civic reward backend, Multi-Tenant Isolation).
Bypassing defenses
- UI-only controls: disabled buttons, hidden menu items and plan strings in responses can all be changed on the client (money-envelopes, Premium feature bypass).
- App-side checks in mobile builds can be instrumented (Mobile reverse engineering, Frida).
- Per-channel enforcement: the same discount applied separately via web, API and mobile (Backend Mastery).
- Rate limits keyed to cheap identities (account, IP, day boundary) (Backend Mastery, API Rate Limiting). GraphQL batching can also bypass rate limits (Web AppSec Interview Questions, GraphQL Batching Attacks).
- Signing schemes with no real secret: public salts, or keys served by an init endpoint (Civic reward backend).
Real-world cases
- B2B data platform: one
unmaskContactData-style flag unmasked 600M+ contacts from a free account. Fixed in under 2 h (Red Agent: one boolean). - Airline GraphQL: price-override and refund mutations sat behind broken object-level authorization (Red Agent: airline BOLA).
- Fintech GraphQL: unauthorized funds transfers by changing account numbers (Salt: fintech GraphQL).
- E-commerce: a trusted client total led to a $4,200 bounty (Top bugs that paid).
- E-commerce: a quantity integer overflow produced a ₹0 order (Integer overflow, ₹0).
- E-commerce: an off-menu quantity made the subtotal 0 (money-envelopes).
- CRM: negative payment amounts were stored as paid (CWE-840) (CRM pentest).
- Order-settlement IDOR paid as a $12,500 P1 (The $0 IDOR worth a $12,500 P1).
- Moderator cascade-deleted org groups across subdomains, rated High (Data deletion via subdomain sync).
- Email verification bypassed by reusing the registration JWT (Email verification bypass).
- AI support agent issued a $4,200 refund from a spoofed approval thread (Hacking AI customer service agents).
- Chinese civic reward backends were forgeable and farmed for cash-out (Civic reward backend).
- Coinbase Advanced Trading API ($250,000, Feb 2022): the balance of the source account was checked but not that its asset matched the order book’s base asset; validate ID relationships and reserve the spent asset atomically. (source)
Prevention
- Server owns every business value: recompute prices and totals, bound numbers, and use overflow-safe arithmetic (Integer overflow, ₹0).
- Server owns entitlement and eligibility, per request and per record. Never infer either from what the client sends (Red Agent: one boolean, Payment extension API).
- Explicit state machines: server-held flow state, single-purpose step tokens, and step tokens (HMAC over flow state) for sensitive flows (OWASP API Top 10 guide with tests).
- Atomic, idempotent money operations: idempotency keys, conditional updates, velocity rules per user, device and ASN, and quota-limited async jobs for bulk operations (OWASP API Top 10 guide with tests).
- Centralised authorization (a policy decision point) so rules aren’t duplicated per handler or channel (Why BAC dominates, Authorization Policy Engines).
- Regression tests for abuse cases: unauthorized references, ineligible accounts, stale states, duplicate submissions. Add audit logs that record actor, target and state change (Payment extension API).
- Manual testing in scope. Scanners are weak at business logic, so API pentests need it as an explicit scope item (Preparing for an API pentest).
Tools
- Burp Suite: Repeater for value and step tampering, Match and Replace to separate cosmetic from real gating (Premium feature bypass). Turbo Intruder or a threaded client for limit-overrun tests (API Pentesting guide).
- Caido as an alternative proxy, used by logic-focused hunters (Interview with Stefan Goossens). Browser DevTools Network tab for token reuse (Email verification bypass).
- JADX and Frida for client-side entitlement logic in mobile apps (Mobile reverse engineering).
- Bitvulnex: a deliberately vulnerable exchange with 40 planted flaws, including withdrawal races and limit bypasses, for training (Bitvulnex).
- Autonomous AI pentest agents for hypothesis-driven logic testing (Red Agent: one boolean).
Sub-pages
- Price and Quantity Manipulation: trusted totals, off-menu and negative quantities, integer overflow
- Workflow and State Bypass: step skipping, leaked step proofs, mid-flow mutation, cross-surface desync
- Coupon and Reward Abuse: stacking, limit-overrun redemption, refund double-spend, referral and reward farming
- Paywall and Entitlement Bypass: client-side plan, credit and quota gating
Related
Race Conditions · Mass Assignment · Second-Order and Multi-Step IDOR · Broken Access Control · MFA Bypass · Password Reset Vulnerabilities · OWASP API Security Top 10 · API Rate Limiting · Vulnerability Chaining · Bug Bounty Methodology
Sources
- Web AppSec Interview Questions · original
- The Red Agent POV: The One Boolean That Broke a B2B Platform's Credit System · original
- The Red Agent POV: Exploiting BOLA in an Airline GraphQL API · original
- API Exploitation For Bug Bounty · original
- Why Broken Access Control Dominates OWASP Top 10 in 2026 · original
- WSTG Methodology: Web Penetration Testing · original
- OWASP API Security Project · original
- OWASP API Security Top 10 Explained (Salt Security) · original
- OWASP API Security Top 10 Risks (Wiz) · original
- OWASP API Security Top 10 (2025) Guide with Tests · original
- How an Integer Overflow Vulnerability Let Me Buy Anything for ₹0 · original
- I almost ordered a product for free. (Business Logic Vulnerability) · original
- API Threat Research: GraphQL Authorization Flaws in a FinTech Platform · original
- The $0 IDOR that was worth more than a $12,500 P1 · original
- Backend Mastery: The Real Bug Bounty Superpower (2026) · original
- Top Bugs That Actually Paid Bounties in 2025 · original
- Hacking AI customer service agents · original
- Intigriti Bug Bytes #241 - October 2026 · original
- The Last Proof of Human Craft: Forging a Microsoft Edge Full Chain with Logic Bugs Only · original
- Bitvulnex: a vulnerable crypto exchange · original
- IDOR and Business Logic Flaw in a Payment Extension API · original
- Protecting Payment, Cart, and Login Endpoints at the Edge · original
- Top Vulnerabilities for Pentest & Bug Bounty in 2025 · original
- Multiple Chinese civic apps share one reward/lottery backend · original
- How I Found an Email Verification Bypass on an AI Freelance Platform · original
- Broken authentication: 7 Advanced ways of bypassing 2-FA · original
- Broken Access Control via Direct URL Navigation: Bypassing Premium Feature Restrictions · original
- How I Found a Data Deletion Bypass via Subdomain Synchronization · original
- API Penetration Testing: Complete Guide · original
- Bug Bounty 101: Complete Roadmap for Beginners (2026) · original
- Interview with Stefan Goossens (G0053) · original
- Bug Bounty Hunting in 2026 · original
- Common Bug Bounty Vulnerabilities: A Technical Deep Dive · original
- API Penetration Testing Combined Checklist · original
- Mastery Hunt: Hidden API Endpoints · original
- Race Condition Authentication Bypass: Full Account Takeover · original
- How I Found a Bug Worth $3,500 — In a Feature Nobody Was Watching · original
- Understanding Mobile App Reverse Engineering · original
- How To Prepare For An API Penetration Test · original
- I Pentested a Real CRM System and Found 4 Critical Vulnerabilities · original
- Coinbase Bug Bounty: Selling Crypto You Never Owned · original