At a glance
- Controls
- CWE-294 · A07:2021 Identification and Authentication Failures
What it is
Payment providers notify the product by webhook when a payment succeeds. The handler adds credit or activates a plan. If it does not record which events it has already handled, the same event works again.
An attacker who can see or resend an event submits it repeatedly. Weak or missing signature and timestamp checks make this easier still. AI-assisted tools read webhook handlers in code quickly and spot missing checks.
Where it hides
What a reviewer can look for in the code and in the behaviour, before anyone proves it.
- Payment success and invoice-paid webhook handlers
- Top-up and wallet credit endpoints
- Plan activation and renewal handlers
- Retry queues that reprocess failed events
How MATT tests it
The proof runs against the deployed product, on every release, whoever wrote the code.
- 01Read the webhook handler to see whether event IDs are stored and signatures and timestamps are checked.
- 02Complete a payment in the provider's test mode on the test account.
- 03Where the customer enables it, resend the same test-mode event and check the account is credited once.
Each payment event must be processed once, matched to its unique ID.
Executable checkas provider (test mode): POST /webhooks/payments with event evt_123 as provider (test mode): POST /webhooks/payments with event evt_123 again expect: second call returns 200 with no new credit expect: one ledger entry for evt_123 expect: unsigned or stale events return 400 or 401
Every rule MATT holds →What the fix looks like
- 01
Verify the provider's signature on every webhook.
- 02
Reject events whose timestamp is outside a short window.
- 03
Store each processed event ID under a unique constraint and skip repeats.
- 04
Confirm the payment status with the provider's API before granting credit.
A check that was never written is found by proving the deployed behaviour, fixed with the engineer who shipped it, and kept fixed by running the control on every change. What is ExploitOps? →