The $750 API Leak: Could This Happen to You?
A hardcoded API key was found in a public GitHub repository belonging to an e-commerce platform. The key allowed access to sensitive customer information through the company's API.
One late night, I was just scrolling through the GitHub repositories and looking for any potential security flaw. After quite some time, I came across a public repository that seemed to belong to some well-known e-commerce platform.
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 developer accidentally committed a secret API key to a public code repository.
Impact
An attacker could access sensitive customer information using the exposed key.
What the attacker needed
Public GitHub repository; hardcoded API key
The fix
The vulnerability was fixed after being reported.
How it was found
- Found a public GitHub repository belonging to an e-commerce platform.
- Discovered a hardcoded API key in the code.
- Tested the key against the company's API.
- Gained access to sensitive customer information.
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 software talk to a service. Here, the key was left in a public code repository, so anyone could find it and use it to read private customer data. The company fixed the issue after being told.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.