Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Are Business Logic Flaws?

A business logic flaw is a defect in the rules an application enforces rather than in its code. Every request looks legitimate, which is why scanners almost never find one.

Illustration for the cybersecurity term Business Logic Flaws
Home / Blog / Cybersecurity Terms / What Are Business Logic Flaws?
17 November 2026

What Are Business Logic Flaws?

What Are Business Logic Flaws?

A business logic flaw is a defect in the rules an application enforces, not in the code that implements them. Nothing is injected, no memory is corrupted, and every request looks perfectly legitimate in the logs. The attacker simply uses the feature in an order, a quantity, or a combination that the designers never imagined. That is why these defects survive years of automated testing and still turn up in the first week of a manual engagement.

Where the Logic Breaks

Most logic failures take one of a few recognisable shapes:

A Worked Example

In 2015 the researcher Egor Homakov showed that Starbucks gift card balances could be transferred between two cards at the same time. Each transfer read the balance before the other had written its result, so the same funds were credited twice. Repeating the loop turned a small opening balance into a much larger one, and the only unusual thing about the traffic was its timing. The underlying defect was a race condition, but the damage came from the business rule it broke.

Why Tooling Misses Them

A scanner has no way of knowing that a customer may not refund the same order twice, or that a 90% discount should never stack with free delivery. MITRE classifies the whole family under CWE-840, which is a category rather than a pattern, precisely because there is no signature to match. The OWASP Web Security Testing Guide devotes section 4.10 to business logic, with tests for data validation, request forging, integrity checks, process timing, and function misuse. Each one assumes the tester has read the specification first.

Designing the Flaws Out

  1. Model the workflow as a state machine on the server and reject any transition that is not valid from the current state.
  2. Recalculate anything that matters. Prices, discounts, entitlements, and balances should be derived from trusted records at the moment of use, never read from the request.
  3. Enforce invariants in the database. Unique constraints, check constraints, and atomic updates hold even when two requests arrive together.
  4. Bound every number, including an upper limit and a rule for zero and negative values.
  5. Make one-shot actions idempotent with a server-issued token, so a replayed request returns the original result instead of a second one.
  6. Instrument the business events, not only the HTTP errors. A sudden run of refunds from one account is visible long before the finance reconciliation.

Abuse cases belong in design, alongside the happy path. A short threat modelling session that asks how each rule could be turned around catches more of this class than any tool.

The UK Angle

Logic flaws in payment journeys sit close to the Financial Conduct Authority’s strong customer authentication rules, where skipping or replaying an authentication step has regulatory weight as well as financial cost. Where a flaw lets one customer reach another customer’s records, it becomes a personal data breach, and UK GDPR requires notification to the ICO within 72 hours of becoming aware of it. Our web application security testing works from your own process documentation, so the rules are tested as written rather than as guessed.

FAQ – Frequently Asked Questions

Can a Vulnerability Scanner Find Business Logic Flaws?

Very rarely. A scanner judges responses against generic patterns such as error messages or reflected input, and a logic flaw produces a perfectly normal response. The request that drains a balance looks like the request that tops it up. Finding these defects needs a human who understands the business rules, usually working from a specification, several test accounts, and a request interception proxy.

How Is a Business Logic Flaw Different from Broken Access Control?

Broken access control is about who may act on which object. A business logic flaw is about what the application allows anyone to do, including the legitimate owner of the account. A user who refunds their own order three times is not reaching another person’s data at all, yet the outcome is still a loss. In practice the two often appear together in the same workflow.

What Do Testers Need from Us Before a Logic-Focused Test?

Process documentation, however rough: the states an order or application can occupy, the limits that apply, who may approve what, and which actions are meant to be single use. Two or three accounts at different privilege levels help, as does a test environment where money movements are simulated. Without this, testers can only guess at the intended rules.

Are Business Logic Flaws Usually Low Severity?

No. Because they abuse intended functionality, they tend to be fully reliable and easy to automate once found, and they often map directly onto money or entitlement. A discount that can be applied repeatedly, or a withdrawal that can be doubled, causes measurable loss from the first attempt and is difficult to distinguish from genuine activity afterwards.

Related Terms

You May Be Interested In These

What Is the Android Security Architecture?

Cybersecurity Terms

17 November 2026

What Is the Android Security Architecture?

Read More
What Are Identity Provider Federation Risks?

Cybersecurity Terms

17 November 2026

What Are Identity Provider Federation Risks?

Read More
What Is NIST SP 800-53?

Cybersecurity Terms

17 November 2026

What Is NIST SP 800-53?

Read More