AI threats
Why scanners miss business-logic flaws
Signatures cannot know that a coupon should work once. Here is what can.
A vulnerability scanner is good at one job: sending known bad inputs and recognising known bad outputs. It sends a quote mark and looks for a SQL error. It requests /.git/config and looks for a file. It reads your headers and compares version strings with a CVE list. That work matters, and we run it too.
But some of the most expensive bugs have no bad input and no bad output. Every request is valid. Every response is 200 OK. The bug is that the app let it happen at all.
What a business-logic flaw looks like
A business-logic flaw is a gap between what your app is supposed to allow and what it actually allows. Some typical ones:
- A coupon that works twice. The checkout marks a code as used after the order is paid. Two requests sent at the same moment both see it unused.
- A negative quantity. The cart accepts
-1, and the total drops below the price of the other items. - A skipped step. Sign-up has three steps: create account, verify email, choose plan. Calling the step-three endpoint straight after step one gives a paid plan with no verification and no payment.
- A trial that never ends. The trial is tied to the email address, and
name+1@company.comis a new address. - A role that grants itself. The profile update endpoint accepts a
rolefield because the admin screen uses the same endpoint.
None of these trigger a signature. A scanner that sends -1 as a quantity sees a normal page. It has no idea what the total should have been.
Why this is hard to automate
To find a logic flaw, a tester needs three things a classic scanner does not have.
A model of what the app is for
You cannot know that a coupon should work once unless you understand what a coupon is. A human tester reads the app, makes a guess about the rules and then tries to break them. That guess is the hard part.
State across many requests
Logic bugs live in sequences: add to cart, apply coupon, change quantity, pay. A scanner fires requests one at a time against single URLs. It does not carry a cart through a checkout, or sign in as two users and make them interact.
An oracle for "wrong"
The scanner's oracle is an error message or a known file. For logic, the oracle is your business rules: the total must be positive, a viewer must not invite users, a cancelled subscription must not reach paid features. Each app has its own.
How AI agents change this
This is where language models help. An agent can read your pages, API schema and JavaScript, and form the same kind of guesses a human tester does: this endpoint changes a price, so try a negative value; this flow has three steps, so try the third one first; this field is called role, so try setting it.
Our agents work in a loop. Recon maps the flows. A hypothesis step writes down a rule the app probably enforces and how it might fail. An exploit step tries it with real sessions, inside your scope and rate limits. Then a deterministic replay runs the same sequence again from a clean state. Race conditions get repeated runs, because a race that wins once in a hundred tries is still a bug.
The replay is the important part. A model guessing about your business is also a model that can be wrong about your business. Some behaviour that looks like a flaw is a feature: perhaps coupons do stack on purpose. So a finding only reaches your report when the exploit reproduces and the impact is concrete, for example a paid plan reached without payment. If it does not reproduce, it is dropped.
Where humans still matter
Some rules live only in your contracts or your head. An agent cannot know that a partner is allowed to see a customer's data under an agreement signed last year. That is why the detailed report shows every finding with its proof so your team can judge it, and why the human sign-off has a senior pentester hand-test the critical paths.
What you can do today
- Write your rules down: who may do what, how many times, in which order.
- Enforce totals, quantities and roles on the server, never only in the form.
- Make one-time actions atomic, with a unique constraint or a lock, not a read followed by a write.
- Check every step of a flow on the server, not only the first one.
- Ignore fields in request bodies that the caller should not control.
A scanner tells you which known problems you have. Testing your logic tells you which new problems only your app has.