Skip to content
Leaked secrets Write-up Intermediate

How I Discovered Critical Secrets in Docker Images by Scanning Every Tag and Architecture

Secrets including AWS keys, database credentials and a Sentry token were found in older tags and alternative architectures of Mozilla's public DockerHub images. An attacker with access to these secrets could potentially access cloud services, databases and error monitoring data.

ghaazy Follow

Published on medium.com

By extending a basic script from Truffle Security’s blog, I created an automation pipeline that scans every tag and architecture of Docker images for secrets using TruffleHog. This approach led me to uncover AWS keys, database credentials, and a Sentry token in Mozilla’s public DockerHub images — issues I responsibly…

Ahmed Ghazy, 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 secrets were accidentally included in older image layers or alternative architecture builds and were not removed when newer images were published.

Impact

The exposed secrets could have allowed access to cloud services, databases and application error monitoring data, though the text does not confirm any actual exploitation.

What the attacker needed

Public DockerHub images; ability to pull images; TruffleHog tool

The fix

The secrets were rotated and the reports were resolved by Mozilla.

How it was found

  1. Collect all Docker images under a namespace such as mozilla/
  2. Enumerate all tags and architecture variants for each image
  3. Pull and scan each image using trufflehog docker
  4. Log and filter results to prioritise verified secrets only

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.

Docker images are like packaged software snapshots that can contain leftover files, including passwords or keys. The researcher scanned every version (tag) and every computer type (architecture) of Mozilla's public images, not just the latest, and found secrets that had been forgotten. Anyone who could download those images could also see the secrets.

What is Leaked secrets?

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

More by ghaazy

View all

3 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.