My First Bug Bounty Story
A hardcoded Alchemy API key was found in a public GitHub repository, allowing unauthorised access to query the Optimism mainnet blockchain. The key was active and could be used to send RPC requests without authentication.
medium.com
Published on medium.com
So I was hunting on this BBP lets call it Target.com I found that they had a Github Repo listed as an inscope asset.
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 key was accidentally committed to a public source code repository.
Impact
The key could be used to query the blockchain without authorisation, but the impact was limited because it only affected a testing blockchain.
What the attacker needed
Access to the public GitHub repository; a tool to scan for secrets
The fix
The exposed API key should be revoked and rotated, and secrets should not be committed to public repositories.
How it was found
- Clone the in-scope GitHub repository.
- Run Gitleaks to scan for secrets.
- Manually verify the findings to remove false positives.
- Test the API key with a curl request to the Alchemy endpoint.
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, a key for a blockchain service was left in public code, so anyone could use it to make requests. This is dangerous because it can lead to unauthorised access and extra costs.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.