I Found a High-Severity Bug by Reading a JavaScript File for 10 M
A JavaScript bundle served from a CDN contained build-time environment variables, including a CI/CD agent token and internal workspace invitation keys. An attacker could use these credentials to access CI pipelines and bypass SSO to join internal workspaces.
Most of my best findings don’t come from fuzzing, exotic payloads, or chaining ten obscure techniques together. They come from reading things other people assumed nobody would ever read.
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 build configuration injected all environment variables into the client-side bundle without restricting which ones were allowed.
Impact
An attacker could register a rogue CI agent to receive jobs and read secrets from other pipelines, and use invitation keys to join internal workspaces bypassing SSO, potentially leading to production compromise.
What the attacker needed
Access to the public CDN-hosted JavaScript bundle; No authentication required to download the bundle
How it was found
- Open the browser's network tab on the login page and identify the large JavaScript bundle loaded from the CDN.
- Search the bundle for the string process.env to find injected environment variables.
- Extract the CI/CD agent token and workspace invitation keys from the bundle.
- Verify the token by sending it to the CI platform's authentication endpoint and observing a response that recognises the token format but rejects it as invalid.
- Check an older version of the bundle to confirm the same categories of secrets appear with different values.
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 sometimes accidentally bake secret passwords or keys into the code that gets sent to every visitor's browser. Anyone can download that code and find the secrets. Here, the secrets could let an attacker get into the company's build system and internal tools.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.