Skip to content
Leaked secrets Write-up Beginner

How i got 100$ bounty

A hardcoded API token was found in a public GitHub repository and allowed the holder to add, delete or modify product details on an e-commerce API. The token was for a test account, so the impact was limited.

mukkumukku110 Follow

Published on medium.com

i found api.example.com. i know every bug hunter already tested this subdomain. but i thought “every software have a bug when you think widely”. i start exploring the subdomain.

DOD cyber solutions, 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 API token was committed to a public GitHub repository, exposing it to anyone who searched for it.

Impact

An attacker could add, delete or modify product details, but the token belonged to a test account, which limited the real-world effect.

What the attacker needed

Public GitHub repository; search access to GitHub; valid store identifier

The fix

The exposed token should be revoked and removed from the public repository, and secrets should not be committed to source code.

How it was found

  1. Enumerate subdomains and find the API subdomain.
  2. Read the API documentation and collect endpoints from archived URLs.
  3. Search GitHub for the API domain together with the token header name.
  4. Refine the search to find repositories that contain a token value.
  5. Use the found token and store identifier to call the API and change products.

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 token is like a password that lets a program talk to a service. Here the token was left in a public code repository, so anyone could find it and use it to change products. The service only gave the token limited power because it belonged to a test account.

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.