Skip to content
Info disclosure Write-up Beginner

How I Hacked One of These Big Companies (JS files analysis)

While reading the main JavaScript bundle of a social website, the author found a hard-coded list of internal subdomains, one of which (a QA/staging replica of the production site) was publicly reachable. The staging site exposed a sitemap referencing a security issue, giving an attacker a view of pre-release features and a possible route to find bugs before they reach production.

l0da Follow

Published on l0da.medium.com

On April 2nd, I started doing some recon at a specific target BBP Sadly until the time of writing this write-up they didn’t respond to my request for public disclosure So I’m gonna call it redacted

L0da, on l0da.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 a hard-coded list of internal and staging hostnames left in the client-side JavaScript bundle, combined with a staging environment that was publicly accessible.

Impact

An attacker could browse a publicly reachable staging replica of the production site, see unreleased features and a reference to a security issue being tested, and potentially find bugs there before they reach production; the report does not show any actual exploitation.

What the attacker needed

None

How it was found

  1. Download the main JavaScript file of the target site locally
  2. Read through the file in sections and note hard-coded hostnames
  3. Check which of the listed subdomains are live
  4. Open the reachable QA site and review its sitemap

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.

Websites ship JavaScript files to the browser, and those files sometimes contain leftover configuration such as internal server names. Here a staging copy of the site, meant only for testing, was reachable from the internet. That let anyone see unreleased features and any bugs being tested there before they went live.

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.