Skip to content
Leaked secrets Write-up Beginner

The Hidden Translation Key: How a Simple Blog Page Revealed a Se

A production Weglot translation API key was embedded in a public blog page's frontend JavaScript bundle, visible to any visitor. An attacker could use the key to make translation requests, potentially inflating billing, injecting spam into translated pages, or causing the key to be suspended and translations to break.

Anshubind Follow

Published on medium.com

Some vulnerabilities don’t hide in admin panels or obscure endpoints. Sometimes, they sit quietly in a public blog page — visible to anyone who knows how to press Ctrl + U.

Anshubind, 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

Root cause

Likely a secret API key was placed in client-side JavaScript instead of being kept on the server.

Impact

An attacker could abuse the key to trigger massive translation requests and inflate charges, inject spam or malicious messages into translated pages, or cause the key to be suspended so translations break for international users.

What the attacker needed

None

The fix

The key should be revoked immediately, replaced with a new scoped key, moved to server-side environment variables, and other repositories and builds should be audited for leaked credentials.

How it was found

  1. Open a public blog page on the target website.
  2. Open the browser inspector and inspect the frontend JavaScript bundle.
  3. Find a Weglot API key embedded in the code.
  4. Send a small, harmless request using the token to confirm it is active.

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 a website loads in your browser, it often downloads JavaScript files that make the page work. If a secret key is placed in those files, anyone can read it by viewing the page source. Here, a key for a translation service was left in the public code, so anyone could use it to send requests to that service.

What is Leaked secrets?

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

More by Anshubind

View all

15 more disclosed reports, best first.

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.