CWE-294Spend & resource abuseSeverity · High

Replayed payment notifications

If a payment webhook can be sent twice and still counts, one real payment can credit an account many times. Each replay adds balance that was never paid.

At a glance

Controls
CWE-294 · A07:2021 Identification and Authentication Failures
Typical severityHigh
ReferenceCWE-294
OWASP Top 10A07: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.

  1. 01Read the webhook handler to see whether event IDs are stored and signatures and timestamps are checked.
  2. 02Complete a payment in the provider's test mode on the test account.
  3. 03Where the customer enables it, resend the same test-mode event and check the account is credited once.
The rule, in plain English

Each payment event must be processed once, matched to its unique ID.

Executable check

as 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

  1. 01

    Verify the provider's signature on every webhook.

  2. 02

    Reject events whose timestamp is outside a short window.

  3. 03

    Store each processed event ID under a unique constraint and skip repeats.

  4. 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? →

ExploitOps discovery call

Understand where your security loop breaks.

A call with a MATT co-founder to understand your product and whether an ExploitOps Review is worth doing. If there is a real need, we scope one with the research team.

Let’s understand your priority

What brings you to MATT?

What would you like help with?
01 / 02