At a glance
- Controls
- CWE-345 · A08:2021 Software and Data Integrity Failures
What it is
Payment providers and partners send webhooks to tell the product that something happened, such as a payment succeeding. The product acts on these messages without checking a signature. Anyone who knows the address can send a message that looks the same.
An attacker sends a fake payment success event and gets goods, credit or a plan upgrade for free. Other fake events can change order states or user records. AI-assisted attackers can guess webhook paths from public docs and code, then copy the exact message format a provider uses.
Where it hides
What a reviewer can look for in the code and in the behaviour, before anyone proves it.
- Payment success and refund webhook handlers
- Partner and integration callback endpoints
- Handlers where signature checks are switched off for testing and never restored
- Handlers that check the signature but skip the timestamp, so old messages can be replayed
How MATT tests it
The proof runs against the deployed product, on every release, whoever wrote the code.
- 01Find every webhook handler in the code and note how each checks the sender.
- 02Send a test event with a missing or wrong signature to a handler, referencing only a MATT test account.
- 03Confirm whether the handler accepts it and changes state, then reverse any change on the test account.
Every incoming webhook must carry a verified signature.
Executable checkas anyone: POST /webhooks/payments with no signature header expect: 401 or 400 expect: no change to the test order or account expect: a correctly signed but old message is refused
Every rule MATT holds →What the fix looks like
- 01
Verify the provider's signature on the raw request body with a shared secret before any processing.
- 02
Reject messages with old timestamps and ignore event ids already handled.
- 03
Confirm important events, such as payments, by fetching them from the provider's API.
- 04
Keep webhook secrets in a secrets store and rotate them.
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? →