Public Code, Private Keys: How I Was Rewarded $$$ for Uncovering
A JavaScript file on a public subdomain contained hardcoded API credentials and request details for a protected endpoint. An attacker could replicate requests to that endpoint and potentially access sensitive appointment data.
Peace be upon you readers, as you are reading my another write up, hoping you are fine and doing well. In this write up, I will demonstrate how did I find a hardcodedcredentials in public JS file and escalated it to a PII leaks.
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
Impact
Anyone could replicate a request to the protected endpoint and potentially access sensitive data such as users' personal appointment details.
What the attacker needed
None
How it was found
- Enumerate subdomains and find the appointment subdomain.
- Open the page and inspect its JavaScript files.
- Follow references from index.js to Schedule.html and then to schedule.js.
- In schedule.js, find hardcoded API credentials and request structure.
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.
Some websites put secret login details directly into their code instead of keeping them on a server. Anyone who views that code can see the secrets and use them to talk to the website's private data service. Here, a file anyone could download contained such secrets for an appointment system.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.