Cloud keys in Docker images are stolen in 8 seconds

A honeypot experiment on Docker Hub found that exposed AWS keys start being used within seconds.

Cloud keys in Docker images are stolen in 8 seconds

Picture leaving your safe’s key inside a box you are about to mail. That is roughly what many people do without noticing, and a new experiment has measured how fast someone shows up to grab it. For non-programmers, the logic is simple: it is like leaving the front door unlocked with a sign pointing to the safe.

Docker images are ready-made bundles: a system, libraries and settings packaged to run anywhere. Many sit on public registries such as Docker Hub, where anyone can download them. If an access secret ends up inside one, it travels with the image to everyone who pulls it.

So why does a secret end up in there? Because it is easy. A configuration file copied by mistake, a variable written straight into the Dockerfile, or a build step that leaves credentials behind are common slips. Each instruction in a Dockerfile produces a layer of the image, and an older layer stays stored even after the file is deleted in a later step. Anyone who inspects the image history can find what was already removed.

The experiment

Two researchers at Stony Brook University, Billy Tsouvalas and Nick Nikiforakis, set out to measure the problem in practice. They prepared 300 honeypot images, each with fake AWS keys planted inside, and spread them across eight public container registries. A honeypot is a trap: a target built to attract whoever should not be there, so its behavior can be observed. Over four months, the researchers tracked what happened.

The response was fast. The images were downloaded more than 75,000 times, and the planted keys received over 140,000 API calls from 5,000 unique IP addresses. An AWS key grants access to paid services, so each of those calls can mean a real cost for the account owner.

The number in the headline

The fastest use of an AWS key came 7.86 seconds after the image was published on Docker Hub. The median time to first use was 51.19 seconds. In most cases, then, someone else had the key in under a minute.

AWS was not the only provider affected. According to BleepingComputer’s coverage, OpenAI and Anthropic keys were also quickly hijacked to drain the balances of the test accounts. The target is not only the cloud: any service that bills by usage becomes interesting to whoever finds the key.

An important caveat

The 8 seconds come from keys the researchers planted themselves. This is not a census of real thefts happening in the world. What the study measures is how quickly automated scanners find exposed secrets, which is valuable information for anyone running systems.

It is also worth keeping cases separate. In November 2025, Flare published a study that identified 10,456 images containing one or more exposed keys on Docker Hub. That is a different study with a different method. It shows the problem is broad, but it is not the source of the 8-second figure.

What to do

Rotating a leaked key is the obvious step, but the more important one is stopping secrets from entering the image in the first place. Use secrets managers, inject credentials at runtime, and review what goes to the registry before you push. An automated check inside the build pipeline helps catch the slip before it leaves the machine.

Anyone who has published a secret should treat it as compromised, even if the image was taken down later. Removing an image from the registry does not guarantee that nobody already downloaded the key. The safe path is to revoke the credential, issue a new one, and review the account’s usage logs.

Anyone who builds container images knows they carry more than they look like they do. The open question is how many of yours have already been downloaded by people you have never heard of.

Editorial note: the figures come from BleepingComputer’s coverage, published on November 17, 2026. Our team has not yet checked the researchers’ original paper.

Sources:

Keep readingSee all →