MediumEcosystem changeOngoing

Docker Hub images: leaked cloud keys used within seconds, study

Researchers found AWS keys left in public Docker Hub images were used within 8 seconds; scan images before pushing and revoke any leaked key.

Published
Updated
Exploitation
Yes, in a controlled study: bots used decoy AWS, OpenAI and Anthropic keys planted in test images. No real victim or Docker Hub breach is reported.

What happened

Two Stony Brook University researchers, Billy Tsouvalas and Nick Nikiforakis, published 300 honeypot images across eight public container registries over four months. The images held AWS, OpenAI and Anthropic API keys, plus decoy SSH and database credentials. BleepingComputer reports they presented the results at the ACM Conference on Computer and Communications Security (CCS).

Key findings, as reported:

  • The fastest use of a planted AWS key came 7.86 seconds after the image was published on Docker Hub. The median time to the first API call was 51.19 seconds, and all 100 AWS keys were used within 15 minutes. Both outlets give these figures: BleepingComputer, Cyber Security News.
  • The outlets give different totals, which appear to cover different scopes. BleepingComputer says the images were pulled more than 75,000 times and the AWS keys received over 140,000 API calls from 5,000 unique IP addresses. Cyber Security News describes the first round only: 100 unadvertised Docker Hub images downloaded 58,819 times, and AWS keys drawing 66,321 requests from 3,842 distinct IP addresses. It notes that IP addresses show where requests came from, not how many attackers were involved.
  • AWS activity ranged from checking whether a key worked, to listing resources, and sometimes consuming them, per BleepingComputer. Cyber Security News says the study’s first-round restrictions blocked attempts to consume AWS resources.
  • The OpenAI and Anthropic keys were quickly used to drain the researchers’ test-account balances (both outlets).
  • Docker Hub accounted for nearly all AWS activity. Harbor, another registry in the test, also saw some AWS key abuse (BleepingComputer).
  • Monitoring rarely detected anyone running the images. The researchers concluded that scanners mostly read image layers or query the registry API without starting the container. Cyber Security News adds that a file removed in a later build step can still be present in an earlier layer.

Cyber Security News stresses that the study did not report a break-in at Docker Hub, and that the 7.86 second case was the fastest observed, not the average.

The researchers suggest that Docker Hub scan images for secrets before publication and warn publishers, and that it restrict or rate-limit access to the public feed of recently published or updated images. According to BleepingComputer, Tsouvalas said they reported the findings to Docker in May and received only an acknowledgment. A small August test showed no changes to defenses. Cyber Security News also says Docker’s security team acknowledged the report. Whether Docker has since made changes is not confirmed.

Am I affected?

You may be if you push images to Docker Hub or another public registry and any image layer, environment setting or config file contains a credential, even one deleted in a later build step. Neither source reports real-world victims or names affected organizations. The scale of real leaks beyond the experiment is not confirmed here. BleepingComputer says exposing secrets this way is common in the real world.

No CVE is involved, and no patched version exists. The sources describe a publishing practice risk, not a software flaw.

What to do now

  1. If an AWS key has shipped in a public image, deactivate it immediately and replace it if the application still needs one. Removing the image does not invalidate a copied key (Cyber Security News).
  2. Review AWS CloudTrail logs from the time of publication for unfamiliar requests, permission changes and unexpected resource creation (same source).
  3. Treat other credentials in affected images, such as OpenAI, Anthropic, SSH and database secrets, the same way: revoke and replace.
  4. Scan the built image, including layers and metadata, before uploading it, not just the source code (same source).
  5. If a build needs a password or token, use Docker BuildKit secret mounts so it is available only during the build step that needs it. Avoid Dockerfile ARG or ENV instructions for secrets (same source).
  6. For applications running on AWS, prefer roles that issue temporary credentials with only the permissions the application needs (same source).

Sources