Billing 0.15.1: Security fix for forged PayPal webhooks
Billing 0.15.1 is a security fix for sites that take PayPal payments: the PayPal webhook accepted any request, so a forged payment event could be processed as genuine.
The check of a PayPal webhook’s signature let every request through on the path the webhook endpoint actually used. Anyone who knew the address could send a fake event and have it treated as a real payment. The check now fails closed: such a request is refused and the endpoint answers 401.
Full PayPal signature verification is not part of this release. Until it is, the PayPal webhook endpoint refuses all requests, genuine ones included. Payments through Stripe, Razorpay and EveryPay are not affected.
Upgrading
Update the dependency as soon as possible if you use PayPal. Expect PayPal webhooks to be rejected after the update.
Full release notes: Billing 0.15.1
0.15.1 · 9 September 2026
Fail-closed PayPal webhook signature verification (PR #41).
Fixed
- Security:
PhoenixKitBilling.Providers.PayPal.verify_webhook_signature/3no longer accepts a PayPal webhook unconditionally when the signature argument isn’t a headers map. The webhook controller always passes the signature as a plain string (same as Stripe/Razorpay), so this catch-all was the only path ever exercised in production and used to return:okunconditionally — any forged request, signed or not, was accepted and processed as a genuine payment event. It now returns{:error, :invalid_signature}(fail-closed), and the webhook controller responds401. Full PayPal signature verification (collecting PayPal’s fivepaypal-transmission-*/paypal-cert-urlheaders into a map) is separate, larger work, not included here — until it ships, the PayPal webhook endpoint rejects all requests, including genuine ones, which is the correct trade-off for a payments webhook.
Billing 0.15.1. Install or update: {:phoenix_kit_billing, "~> 0.15"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.