Leak · Sign-in
Free credits, drained.
The welcome credits you set aside for new customers get collected again and again by one person. Nothing crashes. The bill arrives anyway.
Specification
The class, as Xtarwall tests it.
Pattern, signal, proof and fix, then what XShield adds on a live app. This class sits in the proven tier of the benchmark.
-
Class
business-logic/grant-before-verify- Area
- Money and business logic
- Impact
- Money
- Tier
- Detected, with a fix, proven by running the attack
- Pattern
- A claim endpoint grants credits before it has verified the voucher and never rolls back, so an invalid voucher still pays out.
- Signal
- The balance after a rejected claim is higher than the seeded balance.
- Proof
- Two requests:
POSTthe claim with an invalid voucher, then read the account. The proof passes when credits exceed the seed. Deterministic and replayable. - Fix
- Verify the voucher before any grant, and grant inside the same guarded, idempotent step. XGuard re-runs the proof on every push.
- Live, XShield
- A logic flaw has no request signature, so the fix is the stop. In block mode the guard refuses the adjacent shape it can see, a negative amount, price, quantity or total, with a 403, and holds a source that keeps matching: 10 matches in 60 seconds, then 429 for 60 seconds.
class business-logic/grant-before-verify
seed alice holds 10 credits
step 1 POST /api/credits/claim as alice
{"voucher":"NOT-A-REAL-VOUCHER"}
step 2 GET /api/account/alice as alice
pass status == 200
pass credits > 10
impact mint account credits with any invalid voucher
It looks like normal use.
Nothing crashes and nothing turns red, which is why it goes unnoticed.
What the leak is
Most apps give a new customer something to start with: free credits, a trial, an opening balance. A credit is one unit of paid use, such as one AI answer or one export. The leak is any gap that lets one person collect that welcome many times over.
Why it costs you
Every free credit is real spend on your side: compute, AI usage, payment fees. When one person takes a thousand welcomes, you pay for all of them, and on your dashboard it looks like growth.
How it gets abused
No special tools are needed. The app treats a new account as a new person, or hands out the gift before it has finished checking, or lets the same coupon or refund count twice. Someone notices, and repeats it for as long as it works.
How Xtarwall proves it
On a safe copy, never on your live app.
A safe copy is a stand-in for your app, started for the test and thrown away after it.
Detect
Xtarwall reads how your app grants credits, coupons and refunds, and what it checks before each one.
Prove
On a short-lived safe copy of your app, it acts as a test customer and tries to collect more than one customer's share. If the balance on the copy goes up, the leak is real.
Protect
You get the fix as a specific change to your code, and a proof you can run again to watch the same attempt fail.
No proof, no alert.
XWatch is free: it finds weak spots and writes the fix. Hosted plans add proof by real attack. How it works
What the fix looks like.
In principle. Xtarwall writes the exact change for your code.
Grant once, on the server
The server, not the sign-up screen, decides whether a welcome has already been given, in the same step that gives it.
Tie the gift to something scarce
A new account is easy to make. Anchor the welcome to something that is harder to multiply, such as a verified payment method or a company.
Make repeats harmless
A coupon, grant or refund that arrives twice should change the balance once.
Measured, not promised.
Measured on our test suite, 28 Nov 2026. How we measure
- 83
- attack types detected
- 73
- with a ready fix
- 53
- proven by running the real attack
- 0
- false alarms on 17 safe test cases
The other leaks Xtarwall goes looking for.
Limits that live in the browser
The screen says five a day. The server never counts. Skip the screen and you skip the limit.
An AI endpoint anyone can call
Your AI feature answers whoever asks. Every answer lands on your bill.
One customer in another's data
Someone opens an order, an invoice or a file that was never theirs. You hear about it from them.
Find it on a copy, before someone finds it on the real thing.
Start with XWatch. It is free, and it runs on your own AI key.