Skip to content
IDOR Write-up Intermediate

How I Chained a Hardcoded Password Into a Cross-Merchant Payment

A hardcoded password in a public JavaScript bundle allowed obtaining an OAuth token, which was then used to create payments for any merchant and overwrite webhook endpoints. An unauthenticated tracking endpoint also exposed full payment records.

Insid_e Follow

Published on medium.com

A fintech API security walkthrough, from a leaked JS credential to full webhook interception

Insid_e, 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

Likely the application failed to validate that the authenticated client owned the merchant and terminal identifiers, and it exposed a credential in client-side code.

Impact

An attacker could create payments under any merchant, read full payment records without authentication, and intercept real-time payment events by hijacking webhooks.

What the attacker needed

Access to public JavaScript bundle; authorized testing scope

The fix

The issues were fixed by removing secrets from client-side code, enforcing server-side tenant ownership checks, limiting public tracking data, and requiring elevated authorization for webhook changes.

How it was found

  1. Extract the hardcoded password and OAuth client details from the public JavaScript bundle.
  2. Use the leaked credential to complete an OAuth password grant and obtain a Bearer token.
  3. Send a payment creation request with another merchant's terminalId and merchantId.
  4. Observe that the request succeeds and returns a valid payment page URL.
  5. Access the public tracking endpoint with a trackingId to retrieve full payment details.
  6. Send a PUT request to overwrite a merchant's webhookUrl with an attacker-controlled endpoint.

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 password was left inside the code that runs in your web browser, so anyone could see it. The attacker used that password to log in and then tricked the system into letting them act as other merchants, including changing where payment notifications are sent.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.