Stripe API
The module does not properly check incoming messages when a secret security key is missing. A person could send fake messages that the site accepts as real payments which could let them receive orders or access features without paying.
- Who could do thisAnyone visiting the site. No login needed.
- Does it apply to youA site is affected if no secret security key is set up to check incoming messages.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this critical. Cyber Essentials expects a fix within 14 days. Do it this week.
Tell your developerUpdate Stripe API to 4.0.3.
For developers: what the fix changed
The fix updates StripeApiWebhook::handleIncomingWebhook in src/Controller/StripeApiWebhook.php to reject incoming webhooks if no signing secret is configured. It also adds validation to StripeApiAdminForm::validateForm in src/Form/StripeApiAdminForm.php to require a signing secret when webhooks are enabled.
Also in this release The release also fixes PHP deprecations by adding explicit nullable types and return types and adds tests for the webhook signature verification.
.deprecation-ignore.txt+3 −0.gitlab-ci.yml+1 −1config/install/stripe_api.settings.yml+1 −1 fixsrc/Controller/StripeApiWebhook.php+14 −1 fixsrc/Event/StripeApiWebhookEvent.php+1 −1src/Event/StripeApiWebhookSubscriber.php+1 −1src/Form/StripeApiAdminForm.php+29 −0 fixsrc/Hook/StripeApiRequirements.php+51 −0 fixstripe_api.install+45 −0 fix