Stripe webhook signature verification allows empty secret, enabling forged events #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The backend accepts an empty Stripe webhook secret and still performs HMAC signature verification with that empty value. Because an empty HMAC key is publicly known, an attacker can forge valid Stripe-Signature headers and submit fake webhook events to the public webhook endpoint.
Expected behavior
Service should fail startup (or disable webhook handling) when
STRIPE_WEBHOOK_SECRETis empty.Actual behavior
Service starts and accepts signatures generated with an empty secret.