Back to Newsroom

Threat intel5 min read

Keys left in public container images are used within seconds

An academic honeypot study found bots using an AWS key 7.86 seconds after it was published in a Docker Hub image. All 100 planted AWS keys were used within 15 minutes.

4Tify Team

A cloud access key planted inside a public Docker Hub image was used 7.86 seconds after the image went live. That is the fastest case from an academic experiment presented this week at ACM CCS 2026 in The Hague, and the typical case was not much slower: the median wait before the first AWS request was 51.19 seconds.

Nothing was breached at Docker. The experiment measured how fast automated scanners find secrets that developers leave in published images, and the answer is faster than any human can react.

What happened

Over four months, a university team published 300 honeypot images across eight public container registries. Each image carried bait: AWS, OpenAI and Anthropic API keys, plus decoy SSH and database credentials.

The images were pulled more than 75,000 times. The planted AWS keys received more than 140,000 API calls from about 5,000 distinct IP addresses. All 100 AWS keys planted in the experiment were used within 15 minutes of publication.

The requests ranged from simple checks of whether a key worked, to listing cloud resources, to attempts to use paid services. The OpenAI and Anthropic keys were used to drain the balances on the test accounts.

Who is affected

Anyone who pushes images to a public registry. Nearly all of the AWS activity hit images on Docker Hub, with only isolated cases on Harbor. The 5,000 IP addresses show where requests came from, not how many people were behind them. The team grouped the scanners under one label, "ContainerBots", but found no sign that they belong to a single operator.

How it works

A container image is a stack of filesystem layers. The bots almost never started the containers. They pulled the layers, or queried the registry API, and read the files directly. Two consequences follow:

  • a secret deleted in a later build step is still in the earlier layer, and anyone who downloads the image can read it;
  • runtime monitoring of your running containers will never see this kind of theft, because nothing runs.

The team told Docker about its findings in May. It says it received an acknowledgment and no further response, and that a small test in August showed no changes on the platform. Its suggestions are to scan images for secrets before they go public, warn the publisher, and limit access to the public feed of new and updated images.

What to do now

  1. Treat any key that has shipped in a public image as stolen. Deactivate it and issue a new one. Deleting the image or the tag does not help, because copies already exist.
  2. Check your cloud logs from the moment the image was published. In AWS, look in CloudTrail for unknown callers, permission changes and new resources.
  3. Scan the built image, not only the repository. Run a secret scanner over every layer and the image metadata in CI, and fail the push when it finds something.
  4. Keep secrets out of the build. Docker's own build secrets guide says build arguments and environment variables persist in the final image. Use docker build --secret with RUN --mount=type=secret instead.
  5. Prefer short-lived credentials. AWS recommends temporary credentials such as IAM roles over long-term access keys. Scope them to what the application actually needs.
  6. Cap spending on AI API keys and set usage alerts, so a leaked key cannot run up a bill overnight.
  7. Review old public tags. Images published years ago are still pullable and still scanned.

Where we can help

Most of these leaks start in a Dockerfile or a build script long before an image is pushed. Our AI-assisted code review looks for hardcoded keys, secrets passed through ARG or ENV, and build steps that copy credential files into a layer, so the problem is caught in the repository instead of on a public registry.

NEWSLETTER

The week’s news,
every Friday.

A short email with what we published that week. You can unsubscribe from any of them.

FRIDAY DIGEST · SAMPLE4TIFY NEWSROOM

This week in security

  • 01Attackers exploit critical Cisco Expressway flaw to gain root on clustered nodes
  • 02SonicWall ends Gen 6 firewall patches, even for critical flaws
  • 03WhatsApp fixes three flaws, one possibly used to back up scam messages

+ 6 MORE IN THIS ISSUE · UNSUBSCRIBE IN ONE CLICK

ONE OFFER

More than one product?
Get one offer.

Tell us what you need to protect and your budget, monthly or yearly. We combine the products into one offer and one contract, sized to that budget, and we stay with you after it is signed.

Ask for an offer Just tell us how many assets you have and what you want to spend.
Secrets in Docker Hub images abused within 8 seconds | 4Tify