Classification
- CWE-840 Business Logic Errors (a category), with members such as CWE-841 (improper enforcement of behavioural workflow).
- OWASP Top 10 2021: A04 Insecure Design.
- OWASP API Security Top 10 2023: API6 Unrestricted Access to Sensitive Business Flows.
Typical logic flaws
- Workflow bypass: calling the final step of checkout, onboarding or approval without the earlier ones.
- Numeric abuse: negative quantities, huge values, rounding errors and currency mismatches.
- Reuse: coupons, gift cards, referral bonuses or one-time links applied more than once.
- Trusting client-calculated values such as prices, totals or discount eligibility.
- Automation of flows meant for humans: buying all stock, mass account creation, scraping.
- State confusion between features, such as cancelling an order after it was refunded.
How it is found and proven
Start by understanding the business: what is valuable, what the rules are and who is meant to do what. Map each workflow step by step, then ask what happens if a step is skipped, repeated, reordered, or given a value the UI would never send. Proof is the outcome in the application's own records: an order marked paid without payment, a balance increased, a limit exceeded. Record the full request sequence so developers can replay it.
Remediation
Enforce workflow state on the server; each step should verify the previous one completed. Recalculate prices and eligibility server-side. Make one-time operations idempotent and atomic. Validate ranges and types for every numeric input. For sensitive flows, add abuse controls such as per-account limits, bot detection or step-up verification. Threat-model new features before they ship.
What Pentest-Swarm covers for business logic
Pentest-Swarm does not currently test business logic flaws as a class. It cannot know your pricing rules or which workflows are sensitive. It does cover some flaws that often sit next to logic issues.
- Mass assignment of privileged fields, proven differentially.
- Broken function-level authorisation (BFLA) chains, such as cross-user password reset.
- Object-level authorisation (BOLA) on workflow objects such as orders and invoices.
- Its LLM-driven exploit agent may try workflow variations, but such results are not oracle-verified and should be reviewed.
Where it falls short
Business logic testing is where a human tester who understands the product is clearly better than any automated tool, including Pentest-Swarm. Commission a manual test for payment, refund, rewards and approval flows, and involve product owners in a threat model. Automation is useful afterwards to stop regressions in the access-control layer.
Questions
Why can't scanners find business logic flaws?
Because the requests are valid. Spotting the flaw requires knowing what the application should allow, which a scanner does not.
What is OWASP API6:2023?
Unrestricted Access to Sensitive Business Flows: APIs that let a flow such as buying tickets or posting comments be automated or abused at a scale that harms the business.
Are race conditions business logic flaws?
Often. Applying one coupon many times through simultaneous requests is a logic flaw exploited through a race.