Skip to content
Leaked secrets Write-up Beginner

The Day I Found an Exposed Google Cloud Service Account Key in a

A Google Cloud service account private key was embedded in a publicly served production JavaScript bundle on a Philips-owned domain. Anyone who found it could potentially use the key to access or modify cloud resources, depending on the account's permissions.

Anshubind Follow

Published on medium.com

Bug bounty stories usually start with adrenaline, payloads, and dashboards lighting up, right?

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 build or deployment mistake placed a server-side service account credential file into client-side JavaScript that is served publicly.

Impact

Depending on the service account's permissions, an attacker could access or modify cloud resources, read or delete production data, impersonate backend services, or escalate privileges, though the text does not confirm any of this was actually done.

What the attacker needed

Publicly reachable JS bundle; no account needed to read the file

The fix

The key should be removed from the client-side bundle and rotated, and the text implies rotation happened before misuse.

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 service account is a kind of robot login that programs use to talk to cloud services, and its private key is the password. If that password is placed in a file that any visitor's browser downloads, anyone can read it and pretend to be that robot. The author found such a key while reading a website's script files.

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.