Skip to content
Business logic Write-up Intermediate

How I Hacked Payment Verification via Misconfiguration

The payment gateway leaked its webhook URL and secret in a client-side response, and the merchant platform did not verify webhook signatures. An attacker could send a forged webhook claiming a successful payment and receive the course for free.

medium.com

Published on medium.com

During a recent penetration testing engagement, I discovered a critical misconfiguration in a payment gateway integration that allowed bypassing payment verification entirely. This vulnerability highlights the importance of proper webhook implementation and signature verification in payment systems.

Ali Bahaa Alawsi, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The merchant platform did not validate the cryptographic signature on incoming webhook requests, and the payment gateway exposed the webhook URL and secret in a client-side response.

Impact

An attacker could forge a webhook notification claiming payment succeeded and receive the product or service for free.

What the attacker needed

Ability to send HTTP requests; knowledge of webhook endpoint

The fix

The platform should verify the webhook signature using the shared secret and reject requests with invalid signatures; the text states the issues have been addressed by both parties.

How it was found

  1. Send a payment creation request to the platform's API to start a checkout.
  2. Receive a payment link that redirects to the payment gateway.
  3. Visit the payment link and observe the gateway response leaking the webhook URL and secret.
  4. Craft a webhook request with an invalid signature value.
  5. Send the forged webhook to the platform's webhook endpoint.
  6. Observe that the webhook is accepted and the course is granted without payment.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A webhook is an automatic message one system sends to another, like a payment gateway telling a shop that a payment succeeded. The shop is supposed to check a secret code (signature) on that message to prove it really came from the gateway. Here the shop skipped that check, so anyone could fake the message and get goods without paying.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.