RECON Part 1: Finding Subdomains — How a Hardcoded Password Got
A staging subdomain protected by a client-side password check exposed the password in plain text within a JavaScript file. An attacker could read the password and access unreleased product information.
Hey everyone, Faiz here again. If you’ve been around bug bounty for even a week, you’ve already heard this advice a hundred times: “find subdomains, increase your scope.” Everyone says it.
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 the password check was implemented entirely in client-side JavaScript, with the password hardcoded in the script.
Impact
An attacker could bypass the password and view unreleased product information; the team rated it low severity.
What the attacker needed
A publicly accessible staging subdomain; a password-protected page; ability to view page source
How it was found
- Find a static subdomain that asks for a password.
- Try to submit the form and notice no network request is made.
- Open browser developer tools and inspect the JavaScript file handling the form.
- Search the JavaScript file for the password.
- Use the found password to access the content.
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 website can check a password in two places: on the server (secure) or in the visitor's browser using JavaScript (insecure). Here, the check was done in the browser, and the correct password was written directly in the code that the browser downloads. Anyone who looked at that code could see the password and get in.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.