The Debugging File Nobody Removed Before Shipping: Secrets Expose
A production source map was publicly accessible, allowing full reconstruction of the frontend source code. That source contained a hardcoded third-party monitoring API key with account-level read access, which the reporter confirmed was live via a read-only call.
Modern frontend build tooling produces a specific kind of file that exists purely to help developers debug production code without reading minified, unreadable JavaScript directly — a source map, mapping every compressed, mangled line in the shipped bundle back to its original, readable source. These files are…
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
The production build pipeline deployed source map files publicly, and the frontend source contained a hardcoded third-party API key that was not scoped to be safe for public exposure.
Impact
Anyone could reconstruct the complete frontend source code and recover a live API key granting account-level read access to the company's third-party monitoring configuration, including details of internal non-public environments.
What the attacker needed
None
The fix
Source maps should be excluded from production deployments or restricted to authenticated internal developers, and the exposed key should be revoked and replaced with a properly scoped public-safe key.
How it was found
- Request the bundled JavaScript file's path with a .map extension appended.
- Download the returned source map file.
- Use a source-map-aware reconstruction tool to recover readable source code.
- Search the reconstructed source for hardcoded secrets and internal endpoints.
- Test the recovered API key against the third-party service with a read-only call.
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.
When developers build a website, they often compress the code to make it smaller. A source map is a helper file that lets developers see the original, readable code again. If that helper file is left on the public server, anyone can download it and read the original code, including any secrets the developers accidentally left inside.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.