Skip to content
Leaked secrets Write-up Beginner

How I Turned a 403 Error into a $200 API Key Leak Bounty

A staging subdomain exposed a Supabase API key in the page source of a directory found through content discovery. An attacker who found the key could potentially use it to access the Supabase backend, though the text does not show what access it granted.

medium.com

Published on medium.com

I had been testing the target for 5–6 days and had already reported multiple business logic and BAC issues. When I finished the main scope, I rechecked the domains to see if anything new appeared.

JEETPAL, 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 a secret was hardcoded into client-side page source on a staging environment instead of being kept server-side or restricted.

What the attacker needed

Access to the staging subdomain; content discovery wordlist

The fix

The issue was fixed by the team after validation, though the text does not describe the change.

How it was found

  1. Recheck previously tested domains for changes; an endpoint that returned 500 now returned 403.
  2. Fuzz the domain with a wordlist to discover hidden directories.
  3. Find a directory whose page source contained an exposed Supabase key.
  4. Report the finding for validation and a fix.

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 Supabase key is a password-like string that lets an app talk to its Supabase database and services. Here it was left in the HTML of a staging web page, so anyone who browsed to that folder could read it. The author does not say what the key allowed, only that it was exposed and later fixed.

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.