Kent Lamb, director of Docker Support for Docker Hub, sent out an email last week to some developers about their account status.
In it, he said that, "During a brief period of unauthorized access to a Docker Hub database, sensitive data from approximately 190,000 accounts may have been exposed (less than 5% of Hub users). Data includes usernames and hashed passwords for a small percentage of these users, as well as Github and Bitbucket tokens for Docker autobuilds."
It’s unclear if any data was ever accessed or exfiltrated by the attacker. If they did, then they were most likely to get Github and Bitbucket tokens used for auto-building Docker container images. And those OAuth tokens are a problem for developers.
The tokens allow mixing of information from other accounts with Docker Hub. And those other accounts are sure to have restricted information inside of them. An attacker may use the token to gain entry.
The email recommends certain actions be taken:
"For users with autobuilds that may have been impacted, we have revoked GitHub tokens and access keys, and ask that you reconnect to your repositories and check security logs to see if any unexpected actions have taken place."
"You may view security actions on your GitHub or BitBucket accounts to see if any unexpected access has occurred over the past 24 hours -see https://help.github.com/en/articles/reviewing-your-security-log and https://bitbucket.org/blog/new-audit-logs-give-you-the-who-what-when-and-where"
"This may affect your ongoing builds from our Automated build service. You may need to unlink and then relink your Github and Bitbucket source provider as described in https://docs.docker.com/docker-hub/builds/link-source/"
Docker Hub has pulled the plug on those autobuild tokens, which seems right. They can be recreated from the originating accounts without much trouble.
But as morpheuskakfa wrote on hacker news, "The real concern is how close the hackers came to infiltrating the image source for virtually every modern microservices system. If you could put a malicious image in say alpine:latest for even a minute, there's no telling how many compromised images would have been built using the base in that time."
One response to the comment was, "Yes, huge poisoning target enhanced by the fact images/tags are not immutable, you really have no idea what you are fetching straight from dockerhub, one pull of the same image/tag may be different to the next pull. Most people blindly fetch without verifying regardless with multiple images of varying quality for software packages."
This, then, is the true effect of a Docker Hub leak. Potentially poisoned images could be distributed without the unaware distributors realizing that this is occurring. The hash retrieved will remain that of the image first certified as good, not of the image that is actually being pulled.
Docker Hub is doing what can be done after a breach, but it will remain a developer's responsibility to make sure what they redistribute if the correct information.
— Larry Loeb has written for many of the last century's major "dead tree" computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.