Skip to content
Leaked secrets Write-up Beginner

The God-Mode Leak: How One JavaScript Variable Toppled an Entire

A production API token for the Phrase translation platform was hardcoded in a publicly served JavaScript bundle. An attacker could use it to gain Owner-level access to the organisation's Phrase account, enumerate internal projects and users, and create or delete projects.

Kaif Ashraf Follow

Published on medium.com

I am AgentZeroX — a penetration tester, bug hunter, red teamer, and overall security researcher.

Kaif Ashraf, 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

Impact

The token gave Owner-level control over the Phrase account, allowing enumeration of internal users and projects, download of translation databases, and creation or deletion of projects.

What the attacker needed

Access to the public JavaScript file; No authentication needed to read the file

How it was found

  1. Enumerate subdomains and check which are alive.
  2. Crawl the live hosts to discover endpoints and JavaScript files.
  3. Filter the crawl output to a list of JavaScript files.
  4. Download the JavaScript files and search them for token-related strings.
  5. Test the discovered token against the platform's API to confirm it is valid and privileged.
  6. Use the token to list projects and account metadata, then create and delete a test project.

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 that runs in your browser is public, so anyone can read it. If a secret like an API token is placed inside it, anyone can copy that token and use it to act as the account owner. Here, a token for a translation service was left in a public file, letting the finder read and change the company's translation projects.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.