Skip to content
Leaked secrets Write-up Beginner

STRIPE API-Key Disclosure to Bounty

A live Stripe secret API key was exposed in a JavaScript file on a subdomain. An attacker who found it could use the key to read the account's balance, customer records including email addresses, and internal files.

starlox Follow

Published on starlox.medium.com

First I collect all the Domains from a Target and then start My Recon. Basically I open all the Website and try to Enumerate hidden Files and API-Keys.

#$ubh@nk@r, on starlox.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 a live Stripe secret key was hard-coded into client-side JavaScript served publicly, instead of being kept on a server.

Impact

The exposed live key allowed reading the account balance, customer identities and email addresses, and internal files; the report was accepted as medium impact.

What the attacker needed

Publicly reachable JavaScript file; no account needed

How it was found

  1. Collect the target's domains and open the websites.
  2. Use a browser extension to look for interesting strings in page source and JavaScript files.
  3. Find a JavaScript file on a subdomain that contains a live Stripe secret key.
  4. Use the key with Stripe's balance endpoint to read internal payment details.
  5. Use the key to list customers, revealing user IDs and email addresses.
  6. Use the key to list internal sensitive files.

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 secret API key is like a password that lets a program talk to a payment service. Here that password was left inside a JavaScript file that any visitor's browser downloads, so anyone could read it. With it, the finder could ask Stripe for the company's payment balance, customer list and stored files.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

More by starlox

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.