Business Logic Flaws
What Is Broken and Why
Business logic flaws occur when an application's security controls are implemented only on the client side, or when developers assume users will always follow the intended workflow. Unlike injection attacks, these vulnerabilities use the application's own features correctly from a technical standpoint but in unintended sequences or with unexpected values. They are particularly dangerous because automated scanners rarely detect them — they require understanding the application's intended purpose. Common manifestations include price/quantity manipulation, workflow step bypass, coupon reuse, race conditions in financial operations, and privilege escalation via hidden or predictable parameters.
Key Signals
- Hidden form fields containing prices, discount amounts, user roles, or IDs
- Multi-step purchase/checkout workflows where steps can be skipped via direct URL navigation
- Coupon or discount codes accepted multiple times
- Pricing or quantity fields not validated server-side (only validated in JavaScript)
- Parameters incrementing predictably (orderId=1001, 1002…) suggesting enumerable resources
- Time-sensitive operations (balance checks, reservation holds) that can be exploited between check and action
- Admin or privilege flags passed in HTTP parameters
- Audit log endpoints with insufficient access controls
Methodology
Data Validation Testing (BUSL-01)
- Identify all data entry and handoff points between system components
- Intercept HTTP requests and submit logically invalid values: negative quantities, non-existent IDs, out-of-range prices
- Verify server rejects logically invalid data (not just client-side validation)
Request Forging (BUSL-02)
- Monitor POST/GET for guessable or predictable parameter values
- Identify hidden features (debug flags, admin toggles) in HTTP parameters
- Modify discovered values to test for unintended access or behavior
Integrity Check Testing (BUSL-03)
- Compare hidden HTTP fields against visible GUI fields
- Submit alternative values in "read-only" fields via proxy
- Test log file and audit trail manipulation via unauthorized access
Process Timing Exploitation (BUSL-04)
- Identify time-dependent processes (reservation windows, balance updates, quote validity periods)
- Automate concurrent requests to exploit race conditions
- Diagram the workflow and measure timing windows between steps
Function Use Limit Testing (BUSL-05)
- Identify functions designed for single or limited use (one-time codes, single-use coupons, free trial)
- Attempt re-application via browser back/forward navigation
- Test repeated API calls to bypass server-side counters
Workflow Circumvention (BUSL-06)
- Map the complete multi-step workflow
- Attempt to skip steps by navigating directly to later steps via URL
- Test whether beginning a transaction and abandoning mid-flow grants partial benefits
Payloads & Tools
# Price/quantity manipulation via Burp Intercept
# Original request:
POST /checkout HTTP/1.1
item_id=123&quantity=1&price=99.99&total=99.99
# Modified request:
POST /checkout HTTP/1.1
item_id=123&quantity=1&price=0.01&total=0.01
# Negative quantity for credit
POST /cart/add HTTP/1.1
item_id=123&quantity=-10
# Hidden field privilege escalation
# Original:
POST /profile/update HTTP/1.1
name=John&email=john@domain.com
# Modified (inject hidden admin field observed in source):
POST /profile/update HTTP/1.1
name=John&email=john@domain.com&role=admin&is_admin=true
# Coupon reuse — apply same coupon twice via Burp Repeater
POST /apply-coupon HTTP/1.1
coupon_code=DISCOUNT20
# Race condition on coupon/balance (Burp Intruder / turbo-intruder)
# Send 20 simultaneous requests to apply one-time coupon
# turbo-intruder script:
def queueRequests(target, wordlists):
engine = RequestEngine(endpoint=target.endpoint, concurrentConnections=20)
for i in range(20):
engine.queue(target.req)
# Workflow skip — bypass payment step
# Step 1: /checkout/cart -> Step 2: /checkout/payment -> Step 3: /checkout/confirm
# Skip step 2:
GET /checkout/confirm?order_id=12345 HTTP/1.1
# IDOR — enumerate predictable order IDs
curl -s -b "session=TOKEN" TARGET/orders/1001
curl -s -b "session=TOKEN" TARGET/orders/1002
# Automate with Burp Intruder: numeric sequence on order ID
# Distributed Denial of Dollar — trigger fee thresholds
POST /transfer HTTP/1.1
amount=0.01
# Repeat 10000 times to trigger per-transaction fee accumulation
Bypass Techniques
- Intercept and modify client-side validated fields before server submission
- Replay completed transaction requests with modified amounts
- Use browser developer tools to modify disabled form fields before submission
- Manipulate cookies or local storage containing business-critical state (cart contents, user tier)
- Navigate directly to workflow step N+1 by manipulating URL path or state parameter
- Exploit session persistence: complete partial workflows across sessions to maintain state
- For timing attacks: use Burp Intruder with max concurrency or turbo-intruder for sub-millisecond precision
- Exploit distributed systems' eventual consistency windows for double-spend attacks
Exploitation Scenarios
Scenario 1 — E-Commerce Price Manipulation
Setup: Shopping cart stores price in hidden POST field; server trusts client-supplied price on checkout.
Trigger: Intercept POST to /checkout, change price=299.99 to price=0.01.
Impact: High-value item purchased for near-zero cost; financial loss to merchant.
Scenario 2 — Race Condition on One-Time Coupon
Setup: Discount coupon validated server-side but check and update are not atomic.
Trigger: Send 20 simultaneous POST requests applying the same coupon using Burp Intruder with max concurrency.
Impact: Coupon applied multiple times before server marks it as used; full discount stack.
Scenario 3 — Workflow Step Bypass on Free Trial
Setup: Premium feature gated behind payment step in multi-step checkout; state stored in URL parameter.
Trigger: Skip directly to /account/activate-premium?plan=annual&payment_status=complete without completing payment.
Impact: Premium features activated without payment; revenue bypass.
False Positives
- Server-side validation correctly rejecting manipulated values even when client-side validation is absent
- Race condition window too small to exploit reliably in practice (atomic database transactions)
- Hidden fields present in HTML but ignored by server-side processing
- Admin flags in POST body that are filtered or re-set from server-side session on every request
Fix Patterns
- Never trust client-supplied pricing, discounts, or privilege indicators — recalculate from authoritative server-side data
- Validate business logic server-side: check quantity ranges, valid product IDs, and pricing against database
- Implement atomic operations for race-condition-sensitive flows (database transactions, optimistic locking, Redis SETNX)
- Track workflow state server-side (session), not in URL parameters or hidden fields
- Apply per-user, per-session counters for limited-use functions stored in the database (not cookies)
- Implement audit logging for all financial and privilege operations with anomaly alerting
- Enforce sequential workflow steps server-side: verify prerequisite steps are completed before allowing next step
Related Skills
[[bola-idor]] frequently surfaces business logic violations — accessing another user's order ID often reveals whether they have applied discounts, completed payments, or hold different access tiers. Price manipulation via hidden field tampering is the same class of bug as [[authz-bypass]] parameter tampering. Race conditions in financial operations benefit from the same timing analysis as [[session-fixation]] window attacks. Workflow step-skipping that grants access to restricted features without paying is structurally identical to an [[auth-bypass]] on the payment gate.
1---2name: business-logic-flaws3description: Business logic flaws are application vulnerabilities where valid functions are abused in unintended ways: price manipulation via hidden field tampering, workflow step-skipping, function call limit bypass (coupon reuse), process timing exploitation (race conditions on balance updates), and request forging via guessable/predictable parameters. Detect using Burp Suite proxy interception, HTTP POST/GET parameter analysis, and misuse-case testing against multi-step workflows. Tools: Burp Suite, OWASP ZAP.4license: MIT5---67# Business Logic Flaws89## What Is Broken and Why10Business logic flaws occur when an application's security controls are implemented only on the client side, or when developers assume users will always follow the intended workflow. Unlike injection attacks, these vulnerabilities use the application's own features correctly from a technical standpoint but in unintended sequences or with unexpected values. They are particularly dangerous because automated scanners rarely detect them — they require understanding the application's intended purpose. Common manifestations include price/quantity manipulation, workflow step bypass, coupon reuse, race conditions in financial operations, and privilege escalation via hidden or predictable parameters.1112## Key Signals13- Hidden form fields containing prices, discount amounts, user roles, or IDs14- Multi-step purchase/checkout workflows where steps can be skipped via direct URL navigation15- Coupon or discount codes accepted multiple times16- Pricing or quantity fields not validated server-side (only validated in JavaScript)17- Parameters incrementing predictably (orderId=1001, 1002…) suggesting enumerable resources18- Time-sensitive operations (balance checks, reservation holds) that can be exploited between check and action19- Admin or privilege flags passed in HTTP parameters20- Audit log endpoints with insufficient access controls2122## Methodology231. **Data Validation Testing (BUSL-01)**24 - Identify all data entry and handoff points between system components25 - Intercept HTTP requests and submit logically invalid values: negative quantities, non-existent IDs, out-of-range prices26 - Verify server rejects logically invalid data (not just client-side validation)27282. **Request Forging (BUSL-02)**29 - Monitor POST/GET for guessable or predictable parameter values30 - Identify hidden features (debug flags, admin toggles) in HTTP parameters31 - Modify discovered values to test for unintended access or behavior32333. **Integrity Check Testing (BUSL-03)**34 - Compare hidden HTTP fields against visible GUI fields35 - Submit alternative values in "read-only" fields via proxy36 - Test log file and audit trail manipulation via unauthorized access37384. **Process Timing Exploitation (BUSL-04)**39 - Identify time-dependent processes (reservation windows, balance updates, quote validity periods)40 - Automate concurrent requests to exploit race conditions41 - Diagram the workflow and measure timing windows between steps42435. **Function Use Limit Testing (BUSL-05)**44 - Identify functions designed for single or limited use (one-time codes, single-use coupons, free trial)45 - Attempt re-application via browser back/forward navigation46 - Test repeated API calls to bypass server-side counters47486. **Workflow Circumvention (BUSL-06)**49 - Map the complete multi-step workflow50 - Attempt to skip steps by navigating directly to later steps via URL51 - Test whether beginning a transaction and abandoning mid-flow grants partial benefits5253## Payloads & Tools54```55# Price/quantity manipulation via Burp Intercept56# Original request:57POST /checkout HTTP/1.158item_id=123&quantity=1&price=99.99&total=99.995960# Modified request:61POST /checkout HTTP/1.162item_id=123&quantity=1&price=0.01&total=0.016364# Negative quantity for credit65POST /cart/add HTTP/1.166item_id=123&quantity=-106768# Hidden field privilege escalation69# Original:70POST /profile/update HTTP/1.171name=John&email=john@domain.com7273# Modified (inject hidden admin field observed in source):74POST /profile/update HTTP/1.175name=John&email=john@domain.com&role=admin&is_admin=true7677# Coupon reuse — apply same coupon twice via Burp Repeater78POST /apply-coupon HTTP/1.179coupon_code=DISCOUNT208081# Race condition on coupon/balance (Burp Intruder / turbo-intruder)82# Send 20 simultaneous requests to apply one-time coupon83# turbo-intruder script:84def queueRequests(target, wordlists):85 engine = RequestEngine(endpoint=target.endpoint, concurrentConnections=20)86 for i in range(20):87 engine.queue(target.req)8889# Workflow skip — bypass payment step90# Step 1: /checkout/cart -> Step 2: /checkout/payment -> Step 3: /checkout/confirm91# Skip step 2:92GET /checkout/confirm?order_id=12345 HTTP/1.19394# IDOR — enumerate predictable order IDs95curl -s -b "session=TOKEN" TARGET/orders/100196curl -s -b "session=TOKEN" TARGET/orders/100297# Automate with Burp Intruder: numeric sequence on order ID9899# Distributed Denial of Dollar — trigger fee thresholds100POST /transfer HTTP/1.1101amount=0.01102# Repeat 10000 times to trigger per-transaction fee accumulation103```104105## Bypass Techniques106- Intercept and modify client-side validated fields before server submission107- Replay completed transaction requests with modified amounts108- Use browser developer tools to modify disabled form fields before submission109- Manipulate cookies or local storage containing business-critical state (cart contents, user tier)110- Navigate directly to workflow step N+1 by manipulating URL path or state parameter111- Exploit session persistence: complete partial workflows across sessions to maintain state112- For timing attacks: use Burp Intruder with max concurrency or turbo-intruder for sub-millisecond precision113- Exploit distributed systems' eventual consistency windows for double-spend attacks114115## Exploitation Scenarios116**Scenario 1 — E-Commerce Price Manipulation**117Setup: Shopping cart stores price in hidden POST field; server trusts client-supplied price on checkout.118Trigger: Intercept POST to `/checkout`, change `price=299.99` to `price=0.01`.119Impact: High-value item purchased for near-zero cost; financial loss to merchant.120121**Scenario 2 — Race Condition on One-Time Coupon**122Setup: Discount coupon validated server-side but check and update are not atomic.123Trigger: Send 20 simultaneous POST requests applying the same coupon using Burp Intruder with max concurrency.124Impact: Coupon applied multiple times before server marks it as used; full discount stack.125126**Scenario 3 — Workflow Step Bypass on Free Trial**127Setup: Premium feature gated behind payment step in multi-step checkout; state stored in URL parameter.128Trigger: Skip directly to `/account/activate-premium?plan=annual&payment_status=complete` without completing payment.129Impact: Premium features activated without payment; revenue bypass.130131## False Positives132- Server-side validation correctly rejecting manipulated values even when client-side validation is absent133- Race condition window too small to exploit reliably in practice (atomic database transactions)134- Hidden fields present in HTML but ignored by server-side processing135- Admin flags in POST body that are filtered or re-set from server-side session on every request136137## Fix Patterns138- Never trust client-supplied pricing, discounts, or privilege indicators — recalculate from authoritative server-side data139- Validate business logic server-side: check quantity ranges, valid product IDs, and pricing against database140- Implement atomic operations for race-condition-sensitive flows (database transactions, optimistic locking, Redis SETNX)141- Track workflow state server-side (session), not in URL parameters or hidden fields142- Apply per-user, per-session counters for limited-use functions stored in the database (not cookies)143- Implement audit logging for all financial and privilege operations with anomaly alerting144- Enforce sequential workflow steps server-side: verify prerequisite steps are completed before allowing next step145146## Related Skills147148[[bola-idor]] frequently surfaces business logic violations — accessing another user's order ID often reveals whether they have applied discounts, completed payments, or hold different access tiers. Price manipulation via hidden field tampering is the same class of bug as [[authz-bypass]] parameter tampering. Race conditions in financial operations benefit from the same timing analysis as [[session-fixation]] window attacks. Workflow step-skipping that grants access to restricted features without paying is structurally identical to an [[auth-bypass]] on the payment gate.