| name | business-logic-vulnerabilities |
| description | Business logic vulnerability playbook. Use when reasoning about workflows, race conditions, price manipulation, coupon abuse, state machines, and multi-step authorization gaps. |
SKILL: Business Logic Vulnerabilities โ Expert Attack Playbook
AI LOAD INSTRUCTION: Business logic flaws are scanner-invisible and high-reward on bug bounty. This skill covers race conditions, price manipulation, workflow bypass, coupon/referral abuse, negative values, and state machine attacks. These require human reasoning, not automation. For specific exploitation techniques (payment precision/overflow, captcha bypass, password reset flaws, user enumeration), load the companion SCENARIOS.md.
Extended Scenarios
Also load SCENARIOS.md when you need:
- Payment precision & integer overflow attacks โ 32-bit overflow to negative, decimal rounding exploitation, negative shipping fees
- Payment parameter tampering checklist โ price, discount, currency, gateway, return_url fields
- Condition race practical patterns โ parallel coupon application, gift card double-spend with Burp group send
- Captcha bypass techniques โ drop verification request, remove parameter, clear cookies to reset counter, OCR with tesseract
- Arbitrary password reset โ predictable tokens (
md5(username)), session replacement attack, registration overwrite
- User information enumeration โ login error message difference, masked data reconstruction across endpoints, base64 uid cookie manipulation
- Frontend restriction bypass โ array parameters for multiple coupons (
couponid[0]/couponid[1]), remove disabled/readonly attributes
- Application-layer DoS patterns โ regex backtracking, WebSocket abuse
1. PRICE AND VALUE MANIPULATION
Negative Quantity / Price
Many applications validate "amount > 0" but not for currency:
Add to cart with quantity: -1
Update quantity to: -100
{
"quantity": -5,
"price": -99.99 โ may be accepted
}
Impact: Receive credit to account, items for free, bank transfers in reverse.
Integer Overflow
quantity: 2147483648 โ INT_MAX + 1 overflows to negative in 32-bit
price: 9999999999999 โ exceeds float precision โ rounds to 0
Rounding Manipulation
Item price: $0.001
Order 1000 items โ each rounds down โ total = $0.00
Currency Exchange Rate Lag
1. Deposit using currency A at rate X
2. Rate changes
3. Withdraw using currency A at new rate โ profit from rate difference
Free Upgrade via Promo Stacking
Test combining discount codes, referral credits, welcome bonuses:
Apply promo: FREE50 โ 50% off
Apply promo: REFER10 โ additional 10%
Apply loyalty points โ additional discount
Total: -$5 (free + credit)
2. RACE CONDITIONS
Concept: Two operations run simultaneously before the first completes its check-update cycle.
Double-Spend / Double-Redeem
POST /api/use-coupon โ send 20 parallel requests
POST /api/redeem-gift โ same coupon code, parallel
POST /api/withdraw-funds โ same balance, parallel
Race Condition Test with Burp Suite
1. Capture request
2. Send to Repeater โ duplicate 20+ times
3. "Send group in parallel" (Burp 2023+)
4. Check: did any duplicate succeed?
Account Registration Race
Register with same email simultaneously โ two accounts created โ data isolation broken
Password reset token race โ reuse same token twice
Email verification race โ verify multiple email addresses
Limit Bypass via Race
"Claim once" discounts, freebies, "first order" bonus:
โ Send 10 parallel POST /claim requests
โ Race window: all pass the "already claimed?" check before any write
3. WORKFLOW / STEP SKIP BYPASS
Payment Flow Bypass
Normal flow:
1. Add to cart
2. Enter shipping info
3. Enter payment (card/wallet)
4. Click confirm โ payment charged
5. Order confirmed
Attack: Skip to step 5 directly
POST /api/orders/confirm {"cart_id": "1234", "payment_status": "paid"}
โ Does server trust client-sent payment_status?
Multi-Step Verification Skip
Password reset flow:
1. Enter email
2. Receive token
3. Enter token
4. Set new password (requires valid token from step 3)
Attack: Try going to step 4 without completing step 3:
POST /reset/password {"email": "victim@x.com", "token": "invalid", "new_pass": "hacked"}
โ Does server check that token was properly validated?
Or: Try token from old/expired flow โ still accepted?
2FA Bypass
Normal flow:
1. Enter username + password โ success
2. Enter 2FA code โ logged in
Attack: After step 1 success, go directly to /dashboard
โ Is session created before 2FA completes?
โ Does /dashboard require 2FA-complete check or just "authenticated" flag?
Shipping Without Payment
1. Add item to cart
2. Enter shipping address
3. Select payment method (credit card)
4. Apply promo code (100% discount or gift card)
5. Final amount: $0
6. Order placed
Attack: Apply 100% discount code โ no actual payment processed โ item ships
4. COUPON AND REFERRAL ABUSE
Coupon Stacking
Test: Can you apply multiple coupon codes?
Test: Does "SAVE20" + promo stack to >100%?
Test: Apply coupon, remove item, keep discount applied, add different item
Referral Loop
1. Create Account_A
2. Register Account_B with Account_A's referral code โ both get credit
3. Create Account_C with Account_B's referral code
4. Ad infinitum with throwaway emails
โ Infinite credit generation
Coupon = Fixed Dollar Amount on Variable-Price Item
Coupon: -$5 off any order
Buy item worth $3, use -$5 coupon โ net -$2 (credit balance)
5. ACCOUNT / PRIVILEGE LOGIC FLAWS
Email Verification Bypass
1. Register with email A (legitimate, verified)
2. Change email to B (attacker's email, unverified)
3. Use account as verified โ does server enforce re-verification?
Or: Change email to victim's email โ no verification โ account claim
Password Reset Token Binding
1. Request password reset for your account โ get token
2. Change your email address (account settings)
3. Reuse old password reset token โ does it still work for old email?
Or: Request reset for victim@target.com
Token sent to victim but check: does URL reveal predictable token pattern?
OAuth Account Linking Abuse
1. Have victim's email (but not their password)
2. Register with victim's email โ get account with same email
3. Link OAuth (Google/GitHub) to your account
4. Victim logs in with Google โ server finds email match โ merges with YOUR account
6. API BUSINESS LOGIC FLAWS
Object State Manipulation
order.status = "pending"
โ PUT /api/orders/1234 {"status": "refunded"} โ self-trigger refund
โ PUT /api/orders/1234 {"status": "shipped"} โ mark as shipped without shipping
Transaction Reuse
1. Initiate payment โ get transaction_id
2. Complete purchase
3. Reuse same transaction_id for second purchase:
POST /api/checkout {"transaction_id": "USED_TX", "cart": "new_cart"}
Limit Count Manipulation
Daily transfer limit = $1000
โ Transfer $999, cancel, transfer $999 (limit not updated on cancel)
โ Parallel transfers (race condition on limit check)
โ Different payment types not sharing limit counter
7. SUBSCRIPTION / TIER CONFUSION
Free tier: cannot access feature X
Paid tier: can access feature X
Attack:
- Sign up for paid trial โ enable feature X โ downgrade to free
โ Does feature X get disabled on downgrade?
โ Can you continue using feature X?
Or:
- Inspect premium endpoint list from JS bundle
- Directly call premium endpoints with free account token
โ Server checks subscription for UI but not API?
8. FILE UPLOAD BUSINESS LOGIC
For the full upload attack workflow beyond pure logic flaws, also load:
Upload size limit: 10MB
โ Upload 10MB โ compress client-side โ server decompresses โ bomb?
(Zip bomb: 1KB zip โ 1GB file = denial of service)
Upload type restriction:
โ Upload .csv for "data import" โ inject formulas: =SYSTEM("calc")
(CSV injection in Excel macro context)
โ Upload avatar โ server converts โ attack converter (ImageMagick, FFmpeg CVEs)
Storage path prediction:
โ /uploads/USER_ID/filename
โ Can you overwrite other user's file by knowing their ID + filename?
9. TESTING APPROACH
For each business process:
1. Map the INTENDED flow (happy path)
2. Ask: "What if I skip step N?"
3. Ask: "What if I send negative/zero/MAX values?"
4. Ask: "What if I repeat this step twice?" (idempotency)
5. Ask: "What happens if I do A then B instead of B then A?"
6. Ask: "What if two users do this simultaneously?"
7. Ask: "Can I modify the 'trusted' status fields?"
8. Think from financial/resource impact angle โ highest bounty
10. HIGH-IMPACT CHECKLISTS
E-commerce / Payment
โก Negative quantity in cart
โก Apply multiple conflicting coupons
โก Race condition: double-spend gift card
โก Skip payment step directly to order confirmation
โก Refund without return (trigger refund on delivered item via state change)
โก Currency rounding exploitation
Authentication / Account
โก 2FA bypass by direct URL access after password step
โก Password reset token reuse after email change
โก Email verification bypass (change email after verification)
โก OAuth account takeover via email match
โก Register with existing unverified email
Subscriptions / Limits
โก Access premium features after downgrade
โก Exceed rate/usage limits via parallel requests
โก Referral loop for infinite credits
โก Free trial โ time-limited (no enforcement after trial)
โก Direct API call to premium endpoint without subscription check