CWE-345Automation & fraudSeverity · High

Unsigned webhooks

Webhooks accepted without checking who sent them let attackers fake payment confirmations or partner events and make the product act on false data.

At a glance

Controls
CWE-345 · A08:2021 Software and Data Integrity Failures
Typical severityHigh
ReferenceCWE-345
OWASP Top 10A08: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.

  1. 01Find every webhook handler in the code and note how each checks the sender.
  2. 02Send a test event with a missing or wrong signature to a handler, referencing only a MATT test account.
  3. 03Confirm whether the handler accepts it and changes state, then reverse any change on the test account.
The rule, in plain English

Every incoming webhook must carry a verified signature.

Executable check

as 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

  1. 01

    Verify the provider's signature on the raw request body with a shared secret before any processing.

  2. 02

    Reject messages with old timestamps and ignore event ids already handled.

  3. 03

    Confirm important events, such as payments, by fetching them from the provider's API.

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

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