Skip to content
Info disclosure Write-up Beginner

Bug Bounty Recon: Tokens, PII, and CI/CD Metadata Leaked via Java

A publicly accessible JavaScript file contained hardcoded secrets, CI/CD pipeline metadata, internal repository links, and employee email addresses. An attacker could use these to access internal systems, craft targeted phishing, or compromise the build process.

Medusa Follow

Published on infosecwriteups.com

Friend link: https://medium.com/bugbountywriteup/bug-bounty-recon-tokens-pii-and-ci-cd-metadata-leaked-via-javascript-76e3c2594957?sk=06fa272455d9a2e13839efad005bbc9c

Medusa, on infosecwriteups.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, sensitive build-time environment variables and secrets were embedded into a client-side JavaScript bundle that was publicly served.

Impact

Exposed secrets could allow unauthorised access to APIs or production systems, CI/CD metadata could enable supply chain attacks, and employee email addresses could facilitate targeted phishing; the report does not confirm whether the secrets were still valid.

What the attacker needed

Publicly accessible JavaScript file; no authentication needed

The fix

Sensitive values should be removed from client-side JavaScript and kept server-side, with secrets injected only at build time into server environments.

How it was found

  1. Enumerate subdomains and find an outdated-looking one.
  2. Open browser developer tools, go to the Sources tab, and inspect JavaScript files.
  3. Search the JavaScript for keywords like /api, admin, secret, and access_token.
  4. Identify a JavaScript file containing hardcoded secrets, CI/CD metadata, and employee email addresses.

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 JavaScript file is code that runs in your browser, and sometimes developers accidentally leave sensitive information in it. Here, a file anyone could download contained passwords (secrets), internal server addresses, and staff email addresses. Someone with bad intentions could use these to break into systems or trick employees.

What is Info disclosure?

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

More by Medusa

View all

10 more disclosed reports, best first.

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.