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.
Published on medium.com
I am AgentZeroX — a penetration tester, bug hunter, red teamer, and overall security researcher.
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
- Enumerate subdomains and check which are alive.
- Crawl the live hosts to discover endpoints and JavaScript files.
- Filter the crawl output to a list of JavaScript files.
- Download the JavaScript files and search them for token-related strings.
- Test the discovered token against the platform's API to confirm it is valid and privileged.
- 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.