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: >4 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.5license: MIT6compatibility: Designed for Claude Code. Requires Burp Suite or OWASP ZAP.7metadata:8 category: web9 version: "0.1"10 source: https://skillmd.com/skills/shulkwisec/business-logic-flaws11 upstream: https://owasp.org/www-project-web-security-testing-guide/stable/12 source_types: framework13 wstg: WSTG-BUSL-0114---1516# Business Logic Flaws1718## What Is Broken and Why19Business 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.2021## Key Signals22- Hidden form fields containing prices, discount amounts, user roles, or IDs23- Multi-step purchase/checkout workflows where steps can be skipped via direct URL navigation24- Coupon or discount codes accepted multiple times25- Pricing or quantity fields not validated server-side (only validated in JavaScript)26- Parameters incrementing predictably (orderId=1001, 1002…) suggesting enumerable resources27- Time-sensitive operations (balance checks, reservation holds) that can be exploited between check and action28- Admin or privilege flags passed in HTTP parameters29- Audit log endpoints with insufficient access controls3031## Methodology321. **Data Validation Testing (BUSL-01)**33 - Identify all data entry and handoff points between system components34 - Intercept HTTP requests and submit logically invalid values: negative quantities, non-existent IDs, out-of-range prices35 - Verify server rejects logically invalid data (not just client-side validation)36372. **Request Forging (BUSL-02)**38 - Monitor POST/GET for guessable or predictable parameter values39 - Identify hidden features (debug flags, admin toggles) in HTTP parameters40 - Modify discovered values to test for unintended access or behavior41423. **Integrity Check Testing (BUSL-03)**43 - Compare hidden HTTP fields against visible GUI fields44 - Submit alternative values in "read-only" fields via proxy45 - Test log file and audit trail manipulation via unauthorized access46474. **Process Timing Exploitation (BUSL-04)**48 - Identify time-dependent processes (reservation windows, balance updates, quote validity periods)49 - Automate concurrent requests to exploit race conditions50 - Diagram the workflow and measure timing windows between steps51525. **Function Use Limit Testing (BUSL-05)**53 - Identify functions designed for single or limited use (one-time codes, single-use coupons, free trial)54 - Attempt re-application via browser back/forward navigation55 - Test repeated API calls to bypass server-side counters56576. **Workflow Circumvention (BUSL-06)**58 - Map the complete multi-step workflow59 - Attempt to skip steps by navigating directly to later steps via URL60 - Test whether beginning a transaction and abandoning mid-flow grants partial benefits6162## Payloads & Tools63```64# Price/quantity manipulation via Burp Intercept65# Original request:66POST /checkout HTTP/1.167item_id=123&quantity=1&price=99.99&total=99.996869# Modified request:70POST /checkout HTTP/1.171item_id=123&quantity=1&price=0.01&total=0.017273# Negative quantity for credit74POST /cart/add HTTP/1.175item_id=123&quantity=-107677# Hidden field privilege escalation78# Original:79POST /profile/update HTTP/1.180name=John&email=john@domain.com8182# Modified (inject hidden admin field observed in source):83POST /profile/update HTTP/1.184name=John&email=john@domain.com&role=admin&is_admin=true8586# Coupon reuse — apply same coupon twice via Burp Repeater87POST /apply-coupon HTTP/1.188coupon_code=DISCOUNT208990# Race condition on coupon/balance (Burp Intruder / turbo-intruder)91# Send 20 simultaneous requests to apply one-time coupon92# turbo-intruder script:93def queueRequests(target, wordlists):94 engine = RequestEngine(endpoint=target.endpoint, concurrentConnections=20)95 for i in range(20):96 engine.queue(target.req)9798# Workflow skip — bypass payment step99# Step 1: /checkout/cart -> Step 2: /checkout/payment -> Step 3: /checkout/confirm100# Skip step 2:101GET /checkout/confirm?order_id=12345 HTTP/1.1102103# IDOR — enumerate predictable order IDs104curl -s -b "session=TOKEN" TARGET/orders/1001105curl -s -b "session=TOKEN" TARGET/orders/1002106# Automate with Burp Intruder: numeric sequence on order ID107108# Distributed Denial of Dollar — trigger fee thresholds109POST /transfer HTTP/1.1110amount=0.01111# Repeat 10000 times to trigger per-transaction fee accumulation112```113114## Bypass Techniques115- Intercept and modify client-side validated fields before server submission116- Replay completed transaction requests with modified amounts117- Use browser developer tools to modify disabled form fields before submission118- Manipulate cookies or local storage containing business-critical state (cart contents, user tier)119- Navigate directly to workflow step N+1 by manipulating URL path or state parameter120- Exploit session persistence: complete partial workflows across sessions to maintain state121- For timing attacks: use Burp Intruder with max concurrency or turbo-intruder for sub-millisecond precision122- Exploit distributed systems' eventual consistency windows for double-spend attacks123124## Exploitation Scenarios125**Scenario 1 — E-Commerce Price Manipulation**126Setup: Shopping cart stores price in hidden POST field; server trusts client-supplied price on checkout.127Trigger: Intercept POST to `/checkout`, change `price=299.99` to `price=0.01`.128Impact: High-value item purchased for near-zero cost; financial loss to merchant.129130**Scenario 2 — Race Condition on One-Time Coupon**131Setup: Discount coupon validated server-side but check and update are not atomic.132Trigger: Send 20 simultaneous POST requests applying the same coupon using Burp Intruder with max concurrency.133Impact: Coupon applied multiple times before server marks it as used; full discount stack.134135**Scenario 3 — Workflow Step Bypass on Free Trial**136Setup: Premium feature gated behind payment step in multi-step checkout; state stored in URL parameter.137Trigger: Skip directly to `/account/activate-premium?plan=annual&payment_status=complete` without completing payment.138Impact: Premium features activated without payment; revenue bypass.139140## False Positives141- Server-side validation correctly rejecting manipulated values even when client-side validation is absent142- Race condition window too small to exploit reliably in practice (atomic database transactions)143- Hidden fields present in HTML but ignored by server-side processing144- Admin flags in POST body that are filtered or re-set from server-side session on every request145146## Fix Patterns147- Never trust client-supplied pricing, discounts, or privilege indicators — recalculate from authoritative server-side data148- Validate business logic server-side: check quantity ranges, valid product IDs, and pricing against database149- Implement atomic operations for race-condition-sensitive flows (database transactions, optimistic locking, Redis SETNX)150- Track workflow state server-side (session), not in URL parameters or hidden fields151- Apply per-user, per-session counters for limited-use functions stored in the database (not cookies)152- Implement audit logging for all financial and privilege operations with anomaly alerting153- Enforce sequential workflow steps server-side: verify prerequisite steps are completed before allowing next step154155## Related Skills156157[[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.