Docker Hub secrets stolen in under eight seconds, researchers warn

Cloud keys accidentally left inside public Docker Hub images are being stolen and used by attackers within seconds of publication, according to new research from Stony Brook University. The fastest planted Amazon Web Services (AWS) key was used just 7.86 seconds after its image went live, and every one of the 100 AWS keys in the experiment was used within 15 minutes.
The findings, reported by BleepingComputer on 17 November 2026, come from a four-month honeypot study by researchers Billy Tsouvalas and Nick Nikiforakis, who presented the work at the ACM Conference on Computer and Communications Security (CCS). The speed of the abuse shows that publishing a container image with a secret inside it is, in practice, the same as handing that secret to strangers on the internet.
How the researchers measured the theft
The researchers published 300 honeypot images across eight public container registries. The images contained deliberately planted credentials: AWS keys, OpenAI and Anthropic API keys, and decoy SSH and database credentials. They then watched for any use of those keys and placed detection tools to tell them when an image was pulled, built, run, or had a shell opened inside it.
The scale of the attention was striking. The honeypot images were pulled more than 75,000 times, and the planted AWS keys received over 140,000 API calls from 5,000 unique IP addresses. The traffic ranged from simple checks to see whether a key worked, to listing the resources the key could reach, and in some cases to consuming those resources. The exposed OpenAI and Anthropic keys were quickly hijacked to exhaust the test accounts' balances.
Docker Hub accounted for nearly all of the AWS key abuse, while Harbor, another registry in the experiment, also saw some. The median time to the first API call on a planted AWS key was 51.19 seconds.
Scanners read the layers, they do not run the image
The researchers call the automated scanners that found their images "ContainerBots", although they stress this is a loose umbrella term: the scans showed no evidence of being coordinated by the same operators. Monitoring rarely detected anyone actually running the honeypot images, which led the authors to conclude that scanners generally extract credentials by inspecting image layers directly.
"The scanners interacting with our images overwhelmingly do so through static analysis, e.g., unpacking image layers or querying the registry API to extract filesystem contents, without ever instantiating the container," the researchers explain, according to the ContainerBots research site.
That matters because it means a secret baked into any layer of an image is exposed even if the container is never started. Deleting the image afterwards does not help either: once a key has been copied, it stays copied until it is revoked.
Docker was told in May, with no change found in August
Tsouvalas told BleepingComputer that the researchers reported their findings to Docker in May, along with the full paper, but received no follow-up beyond an acknowledgement. A small-scale experiment run in August to check whether any defences had been added to the platform showed no changes.
The researchers recommend that Docker Hub scan images for secrets before they go live and warn publishers if any appear to be embedded. They also suggest restricting or rate-limiting access to Docker Hub's public feed of recently published or updated images, to make mass scanning harder.
What developers should do now
Anyone who publishes container images should treat the findings as a practical warning. Secrets should never be baked into an image: use a secrets manager or pass credentials at run time, scan images for embedded keys before pushing them, and rotate any key that may ever have appeared in a public image, even briefly. Leaked keys are common in the real world, and revoking them takes significant work and coordination, so prevention is far cheaper than cleanup.
Frequently asked questions
How fast were leaked Docker Hub keys stolen? The fastest planted AWS key was used 7.86 seconds after its image was published on Docker Hub, the median first use was 51.19 seconds, and all 100 AWS keys were used within 15 minutes.
Did the attackers run the researchers' images? Rarely. The scanners overwhelmingly extracted credentials by unpacking image layers or querying the registry API, without ever running the container.
What should I do if a key was in a public image? Revoke and rotate the key immediately, remove it from the image, and check the account's usage logs for unauthorised activity.