Skip to content
Info disclosure Write-up Beginner

Credentials Leaked in JS: Inspect Element, Then Exfiltrate

A public home page embedded a JavaScript object containing member email addresses and bcrypt password hashes, visible to any visitor without login. An attacker could collect these hashes and attempt to crack weak passwords offline to take over accounts.

medium.com

Published on medium.com

This bug I found on a B2B platform on the home page. This credentials leaked here are accessible to any user with the internet no login required at all.

xploiterr, on medium.com

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 server-side code embedded sensitive member data directly into the HTML of a public page without access control.

Impact

An attacker could obtain email addresses and bcrypt hashes, and if users chose common passwords, crack them offline to access accounts; the report notes the hashes are bcrypt and not trivially crackable.

What the attacker needed

None

The fix

The issue was fixed immediately within 30 minutes, likely by removing the embedded member data from the public page.

How it was found

  1. Open the public home page of the B2B platform.
  2. Use the browser's Inspect Element to view the page source.
  3. Locate an inline script tag containing a JavaScript object with member records.
  4. Observe that each record includes full email addresses and bcrypt password hashes.

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.

The website's home page included a hidden list of user details inside its code, which anyone could see by viewing the page source. This list contained email addresses and scrambled passwords (hashes). If a user chose a common password, an attacker could unscramble it and log in as that user.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.