Skip to content
Leaked secrets Write-up Beginner

How I Found a Stripe Key Disclosure Leading to PII Exposure

A Stripe live API key was exposed in publicly accessible URLs, allowing an attacker to query Stripe's API and retrieve customer PII and payment receipts. The exposed key also permitted fetching receipt URLs that contained names, billing amounts, and addresses.

nihaltikka Follow

Published on medium.com

In one of my recent penetration testing engagements, I uncovered a critical vulnerability in an application (named as redacted) that exposed sensitive customer information, including credit card details, email addresses, phone numbers, and billing addresses. This was caused by a leaked Stripe API key embedded in the…

EL_Cazad0r, 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 Stripe live API key was hardcoded into publicly accessible frontend URLs and the server did not enforce proper access controls, allowing the key to access sensitive endpoints.

Impact

An attacker could access customer PII including names, emails, addresses, phone numbers, and payment receipts, leading to data breach risk and compliance violations.

What the attacker needed

Access to the public URLs; no authentication required

The fix

The exposed API key was revoked and the Stripe integration was secured within a week.

How it was found

  1. Identify URLs that leaked sensitive data due to improper API key handling.
  2. Find a Stripe live API key exposed in one of those URLs.
  3. Use the key to make a request to Stripe's charges endpoint.
  4. Observe customer data returned in the response.
  5. Extract receipt URLs from the response and visit them to view payment receipts.

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.

An API key is like a password that lets a program talk to a service. Here, a secret key for the payment service Stripe was left in web addresses that anyone could open. Because the key had too much power, anyone who found it could read customers' personal and payment information.

What is Leaked secrets?

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

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.