Finding F-04, severity Critical.
A forged Stripe webhook marks an unpaid invoice paid
An attacker needsThe webhook URL. No key, no login, no signature.
POST /functions/v1/stripe-webhook
Content-Type: application/json
{"id":"evt_forged_0001",
"type":"checkout.session.completed",
"data":{"object":{"amount_total":0,
"metadata":{"invoice_id":"e3f4828b…"}}}}{"received":true}
# then GET the invoice:
[{"number":"NLS-1019","status":"paid",
"total":5580,"paid_at":"2026-11-22T16:05…"}]What leaked: NLS-1019 ($5,580) went from sent to paid with a $0 payment row, and the client was emailed a $0 receipt.
Hardened route: POST /api/stripe/webhook, same body, no or fake signature
{"error":{"code":"invalid",
"message":"Webhook signature verification failed", …}}Why: The signature is checked on the raw body before anything is parsed. NLS-1019 stays unpaid.
Fix: The webhook verifies Stripe-Signature on the raw body before it parses anything, then compares amount and currency.

