Join our Newsletter — 33% off our NHI Course
Home› Guides› Business Logic Flaws for Beginners: When Software Works…
Guide Web & API Security

Business Logic Flaws for Beginners: When Software Works as Built but Still Gets Abused

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 8 min read
On this page

A business logic flaw is a weakness in the rules or steps an application follows, so that someone can misuse a normal feature, such as a discount, a refund or a booking, in a way the designers never intended, without breaking any code.

Business logic flaws are one part of application security. If you are new to that field, start with Application Security for Beginners. This page explains, at concept level and from a defender's point of view, what these flaws are, why scanners often miss them, and how teams can spot and reduce them.

By the end of this guide you will be able to:

  • Explain what a business logic flaw is and how it differs from a coding bug.
  • Describe how design reviews, server-side checks and monitoring reduce these flaws.
  • Identify the rules in your own systems that are most worth checking.

Key takeaways

  • The software works as built, but the rules are wrong or unenforced. The weakness is in the workflow, not in a broken line of code.
  • Scanners often miss them. MITRE notes that business logic errors are difficult to find automatically, because a tool does not know what your business intends.[2]
  • Design is where they start. Asking "how could someone misuse this?" during design is one of the best ways to catch them.
  • The server must enforce the rules. Limits, prices, step order and who can do what should be checked on the server, not trusted from the browser or app.

What it is, in plain English

Every application has business logic: the rules that describe how the business works, such as "a voucher can be used once", "a refund cannot be bigger than the original payment" or "you must pay before the order ships". A business logic vulnerability is a flaw in how those rules or workflows are enforced, which lets someone misuse a process rather than break the code directly.

Think of a supermarket loyalty scheme that gives points for each purchase and takes them back for returns. If the till gives points when you buy but forgets to remove them when you return the item, a customer could buy and return the same item repeatedly and collect points. Nothing is "hacked": the till does exactly what it was programmed to do. The rule was simply incomplete. Where the analogy breaks down: online, the same trick can be automated and repeated thousands of times in minutes, so a small gap can become a large loss quickly.

OWASP, the open community behind the best-known web security lists, gives a similar example in its Insecure Design category: a cinema chain allows group booking discounts for up to fifteen people before a deposit is needed, and a threat model finds that someone could book hundreds of seats across all cinemas in a few requests, causing a large loss of income.[1] This matters because these flaws cost money, open the door to fraud and can expose data, and the usual security tools may not flag them.

How it works, step by step

From a defender's point of view, business logic flaws usually come about, and are caught, in a pattern like this.

  1. A rule is assumed, not enforced. The team assumes users will follow the normal path: add to basket, pay, then confirm. Nobody writes down what should happen if a step is skipped, repeated or done out of order.
  2. The rule lives in the wrong place. A limit or price is checked only in the browser or mobile app, which the user controls, instead of on the server.
  3. Someone uses a feature in an unexpected way. They repeat a step, change a value the app sends, combine two offers, or come back to a step after it should have closed.
  4. The application accepts it. Because each individual request looks normal, there may be no error and no alert.
  5. The impact shows up later. Unusual refunds, negative balances, stock that never sells or a spike in vouchers often appear in finance reports or customer complaints before security tools notice.
  6. The fix is a rule, not a patch. The team writes the rule down, enforces it on the server, adds a test that checks the misuse no longer works, and monitors for repeats.

The OWASP Application Security Verification Standard (ASVS) 5.0 has a chapter on validation and business logic that turns this into checkable requirements, for example:[3]

ASVS 5.0 requirementWhat it asks for, in plain English
V2.3.1Business processes run in the expected order for each user, without skipping steps.
V2.3.2Business limits written in the documentation are actually enforced.
V2.3.4Limited resources, such as theatre seats or delivery slots, cannot be double-booked.
V2.2.3Combinations of related values make sense according to agreed rules.
V2.4.1Anti-automation controls protect against excessive calls to application functions.

A worked example

Greenleaf Meals is a fictional meal-kit company. Its website offers new customers a 50 per cent welcome discount on their first box, applied with a code.

In the monthly finance review, Tom, the finance lead, notices that welcome discounts are much higher than the number of genuinely new customers. He raises it with Lina, the lead developer. Without trying to reproduce any misuse on the live site, they read through how the offer works and find two gaps: the "first box only" rule was checked by the web page, not by the server, and the system treated every new email address as a new customer, even when the delivery address and card were the same as an existing account.

Lina's team moves the check to the server, so a code is accepted only once per customer, and adds a rule linking the offer to delivery address and payment card as well as email. They write tests confirming that a second use is refused, and set an alert if welcome discounts in a day rise well above normal. Tom agrees a review of the other offers, starting with referral rewards. The changes reduce the abuse they saw; they do not make the offers immune to every trick, so the monitoring stays in place.

Common mistakes

MistakeWhat to do instead
Trusting values sent by the browser or app, such as price, quantity or discount.Recalculate and check every important value on the server.
Only testing the "happy path" where users behave as expected.Write misuse cases for key flows, as OWASP recommends, and test that the misuse is refused.[1]
Relying on automated scanners alone.Combine scanning with design reviews and manual testing by people who understand the business rules.
Leaving business rules undocumented.Write down limits, step order and who may do what, so they can be built, tested and reviewed.
No monitoring of business numbers.Watch for unusual refunds, discounts, balances and bookings, and share alerts between finance, fraud and security teams.

Key terms

Business logic vulnerability
A flaw in how an application's workflow or rules are enforced, letting someone misuse a process rather than break the code directly.
Server-side validation
Having the server, not the user's browser or app, decide whether a sensitive action is allowed.
Input validation
Checking that data matches the type, format and range the application expects before it is used.
Misuse case
A description of how an attacker or careless user could abuse a system, rather than how a legitimate user completes a task.
Rate limiting
Restricting how many requests a caller can make in a set period, to protect availability and reduce abuse.
Threat modelling
A structured way to identify how a system could be attacked before those weaknesses are exploited, and to decide which controls reduce the risk.

First steps

Three things you can do this week:

  1. List your money and access rules. Write down the rules around discounts, refunds, credits, bookings, limits and approvals in your main application.
  2. Ask "where is this checked?" For each rule, confirm with your developers that the server enforces it, not only the web page or app.
  3. Look at the numbers. Ask finance or operations for a report of unusual refunds, discounts or bookings in the last three months, and look for patterns.

Checklist

Checklist:

  • Key business rules are written down where developers and testers can see them.
  • Prices, quantities, limits and discounts are checked on the server.
  • Multi-step processes refuse skipped or repeated steps.
  • Limited resources, such as stock, seats or slots, cannot be double-booked.
  • Key flows have misuse cases and tests that check the misuse is refused.
  • High-value actions have sensible rate limits or anti-automation controls.
  • Finance, fraud and security teams share alerts on unusual business activity.

Suggested learning pathway

Standards and references

  1. A04:2021 Insecure Design. OWASP Top 10:2021, OWASP Foundation. https://top10.owasp.org/2021/A04_2021-Insecure_Design/index.html, accessed 27 Nov 2026.
  2. CWE-840: Business Logic Errors (grouping). Common Weakness Enumeration, MITRE. https://cwe.mitre.org/data/definitions/840.html, accessed 27 Nov 2026.
  3. Application Security Verification Standard 5.0.0, chapter V2 Validation and Business Logic. OWASP Foundation. https://owasp.org/www-project-application-security-verification-standard/, accessed 27 Nov 2026.

Related NHI Mgmt Group resources: Application Security Guide · API Security for Beginners · Secure Coding for Beginners

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.