The Anatomy of a Business Logic Attack
A business logic attack is any attack that abuses the intended functionality of an application to achieve an unauthorized outcome. The key word is "intended" โ the attacker isn't exploiting a coding error or an injection vulnerability. They're exploiting the design of the business process itself, finding edge cases, sequences, or combinations of valid operations that produce unintended results.
This makes business logic attacks fundamentally different from every other vulnerability class:
- No injection payload. The requests contain no SQLi, XSS, or command injection. Every field is valid data.
- No authentication bypass. The attacker uses legitimate credentials. They're often a real, registered user of the system.
- No rate limit trigger. The attacker operates within normal usage parameters, making the attack statistically invisible.
- No known CVE. Business logic flaws are application-specific. There's no shared vulnerability database entry โ and no WAF rule โ that covers your application's specific implementation of a loyalty point system or a refund workflow.
The Business Logic Attack Taxonomy
Price Manipulation
Manipulating price, discount, or quantity parameters in API calls to purchase items at unintended prices. Often exploited via parameter tampering in checkout APIs that trust client-submitted values.
Workflow State Bypass
Calling API endpoints out of the intended sequence โ skipping payment verification, jumping past approval workflows, or accessing post-completion resources before prerequisites are met.
Loyalty & Reward Exploitation
Exploiting referral bonuses, cashback loops, or reward programs by making API calls in sequences that trigger credit issuance without the corresponding qualifying purchase or activity.
Race Condition Exploitation
Making concurrent API calls to exploit timing windows in transactional operations โ simultaneously spending the same wallet balance multiple times before the lock is applied, or redeeming a coupon code simultaneously from multiple sessions.
Mass Assignment
Submitting additional fields in API request bodies that the developer didn't intend to be user-settable โ elevating your own role to admin, marking your own order as refunded, or setting your account credit to an arbitrary value.
Inventory & Reservation Abuse
Reserving limited inventory (concert tickets, limited-edition items, hotel rooms) without intent to purchase โ holding locks on resources via repeated add-to-cart / abandon cycles to deny inventory to legitimate customers.
Real Attack Walkthroughs
Attack 1: The Refund Loop
A marketplace API allows users to request a refund for any order in "completed" status within 30 days. The API updates order status to "refunded" and credits the wallet. The logic flaw: the status check and the credit happen in two separate API calls with no atomic transaction lock.
# Legitimate refund flow POST /api/orders/89234/refund โ 200 {status: "refunded", credit: 149.99} # Race condition exploit โ 50 concurrent requests before status update commits POST /api/orders/89234/refund [ร50 concurrent] โ 47 requests see "completed" status before lock โ 47 ร $149.99 = $7,049.53 credited โ 1 order refunded 47 times. No injection. No auth bypass. Fully valid API calls. # ziriz.ai runtime detection [RACE_CONDITION_DETECTED] order:89234 โ 47 concurrent refund calls in 180ms โ BLOCKED: all but first call rejected inline, order locked
Attack 2: The Loyalty Point Fabrication
A SaaS platform credits loyalty points for API integrations that send more than 100 events per day. The API accepts event submissions and processes points asynchronously. The logic flaw: there's no uniqueness constraint on event IDs โ the same event can be submitted multiple times and counted.
# Attacker submits same event_id 1,000 times in a loop POST /api/events {event_id: "evt_abc123", type: "purchase", ...} [ร1000] โ 1,000 events counted โ 10 days of fake activity credited in 60 seconds โ $500 in loyalty rewards issued for $0 of real activity # ziriz.ai runtime detection [IDEMPOTENCY_ABUSE] event_id evt_abc123 submitted 1,000 times in 60s โ BLOCKED after first submission: duplicates rejected
Attack 3: The Checkout Price Tamper
A mobile app API passes product prices from the client to the server in the checkout request body. The server doesn't re-validate prices against the product catalog โ it trusts the submitted values. An attacker intercepts the API call and modifies the price field.
# Legitimate checkout POST /api/checkout {"product_id": "PRD-5521", "price": 299.99, "qty": 1} โ 200 OK charge: $299.99 # Price manipulation attack POST /api/checkout {"product_id": "PRD-5521", "price": 0.01, "qty": 1} โ 200 OK charge: $0.01 โ Product shipped, $299.98 loss # ziriz.ai runtime detection [PRICE_PARAMETER_ANOMALY] submitted price $0.01 deviates >95% from catalog price $299.99 โ BLOCKED: request rejected, alert raised
Why Signature-Based Tools Are Structurally Blind
| Attack Type | WAF / Signature Detection | ziriz.ai Runtime Detection |
|---|---|---|
| Race condition / concurrent calls | โ Sees only individual requests | โ Detects concurrency pattern across sessions |
| Workflow sequence bypass | โ No state model | โ Tracks API call sequences per session |
| Price / parameter manipulation | โ No knowledge of valid values | โ Compares submitted values to runtime baseline |
| Loyalty reward abuse | โ No business context | โ Detects idempotency violations and anomalous reward ratios |
| Mass assignment | Partial (schema validation) | โ Detects unauthorized field submission at runtime |
| Inventory hoarding | โ Valid operations | โ Identifies reservation:purchase ratio anomalies |
| Agentic business logic abuse | โ Not applicable | โ Behavioral baseline per agent workload |
Business Logic Abuse by AI Agents
The business logic attack surface has expanded dramatically with the deployment of AI agents. Agents that are given access to transactional APIs โ payment, inventory, ordering, workflow โ can systematically probe business logic boundaries at machine speed in ways that would be obvious at human scale but become statistically normal at agent scale.
More concerning: a prompt-injected or jailbroken agent can be directed to deliberately exploit business logic vulnerabilities โ probing refund APIs, manipulating checkout parameters, or executing concurrent calls โ using the agent's own legitimate credentials. From the WAF's perspective, nothing anomalous happened. From ziriz.ai's runtime behavioral baseline, the agent's call sequence and parameter distributions are wildly inconsistent with its established behavior pattern.
Business logic attacks are only invisible to tools that look at individual requests in isolation. Runtime monitoring that tracks sequences, ratios, parameter distributions, and behavioral patterns across a session โ compared against a baseline of what legitimate use actually looks like โ can detect business logic abuse that leaves no signature at the individual API call level. That cross-request, behavioral context is what ziriz.ai provides.
Detect business logic abuse before it becomes financial fraud.
The free ziriz.ai API Risk Assessment identifies your most exposed business logic flows โ payment APIs, refund endpoints, loyalty systems, and checkout logic โ and shows you what anomalous patterns would look like at runtime.
Request Free Business Logic Security Assessment