Billy Tsouvalas and Nick Nikiforakis planted credentials in public container images and watched strangers use them. The fastest observed AWS key use came 7.86 seconds after publication on Docker Hub. A cleanup process that starts after an image goes public can already be too late.
Keep secrets out of published images, check the built artifact before pushing, and revoke any credential that escapes. Removing an image cannot invalidate copies of its keys.
What the experiment measured
The researchers’ ContainerBots project describes 300 instrumented images across eight public registries over four months. The images contained monitored AWS, OpenAI and Anthropic API keys, alongside decoy SSH and database credentials. This was a honeypot study: deliberately exposed test resources used to observe outside activity.
Bill Toulas’s November 17 report gives these results:
- 100 planted AWS keys were used within 15 minutes, with a median first API call at 51.19 seconds. These timings describe the tested keys, not every real-world leak.
- The AWS keys received more than 140,000 API calls from about 5,000 distinct IP addresses. Calls included checking credentials, listing resources and some resource consumption. IP addresses do not count distinct attackers or compromised organizations.
- The exposed OpenAI and Anthropic accounts had their test balances exhausted. The project page corroborates the balance-draining observation without establishing losses outside the experiment.
- Docker Hub accounted for nearly all observed AWS activity. Harbor also saw some AWS key abuse; the study does not establish equal exposure across all eight registries.
Evidence status: researcher-reported real-world misuse of deliberately planted credentials. These are observations of outside activity against test accounts, not an incident count for Docker customers.
An image need not run to expose its files
Toulas reports that monitoring rarely detected anyone running the honeypot containers. The researchers attribute most extraction to inspecting image layers directly. A container can therefore leak its embedded credentials without ever starting on somebody else’s machine.
The exposed party is the publisher whose image contains a usable secret, and whichever service that secret authorizes. Public image availability plus a valid credential is the relevant combination. No Docker engine vulnerability, affected release range or CVE is identified in this report.
A source-code check alone can miss credentials introduced during a build. Build arguments, configuration files and copied directories can put sensitive values into the artifact that eventually leaves the developer’s machine.
Prevent publication; revoke after exposure
Docker’s own build documentation says that Dockerfile ARG and ENV are inappropriate for build secrets because values can persist in the final image. It recommends secret mounts or SSH mounts, which provide credentials to the build instruction that needs them.
For developers and release teams:
- Use temporary build-secret mounts, and keep their contents out of generated files and logs. A mount cannot stop a build step from deliberately copying its secret into the output.
- Keep local credential files out of the build context. Docker documents
.dockerignoreexclusions. Combine those exclusions with deliberate copying of only the files the application needs. - Check the final image before publication, including its layers and metadata. Docker’s secret-related build check flags suspicious
ARGandENVnames. That specific check is not a complete audit of arbitrary file contents. - Revoke an exposed key at its issuing service, replace it in legitimate workloads, and rebuild a clean image. Deleting a public tag or publishing a replacement cannot recall credentials already extracted.
- Review account activity and spending after exposure. Look for use of the affected identity, unexpected resources and changes to access. A quiet container runtime log does not establish that its image’s credentials went unused.
AWS recommends roles and short-lived credentials where possible. Long-lived keys remain valid until manually revoked. Limit permissions as well as lifetime, so a leaked credential reaches less of the account.
Toulas says Docker acknowledged the researchers’ May disclosure but provided no further reply. He reports that an August follow-up experiment found no change. That is the researchers’ account of the response, not confirmation of Docker’s current internal controls.
Caveat: The full ACM paper was inaccessible during review; detailed timings above are attributed to Toulas’s full report, checked against the researchers’ public project summary. Tsouvalas’s personal site lists a Cloudflare research-engineer role; no Cloudflare product is required for these defenses.