Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
1146 points"On Thursday, April 25th, 2019, we discovered unauthorized access to a single Hub database storing a subset of non-financial user data. Upon discovery, we acted quickly to intervene and secure the site.
We want to update you on what we've learned from our ongoing investigation, including which Hub accounts are impacted, and what actions users should take.
Here is what we’ve learned:
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.
Actions to Take:
- We are asking users to change their password on Docker Hub and any other accounts that shared this password.
- 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/
We are enhancing our overall security processes and reviewing our policies. Additional monitoring tools are now in place.
Our investigation is still ongoing, and we will share more information as it becomes available.
Thank you,
Kent Lamb
Director of Docker Support
info@docker.com"
Comments (257) 45 threads
If they had write access, then leaked personal data is the least of anyone's worries. 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.
Even then just read access to code often allows enough info for leveraging/escalating privilege.
I'm not 100% sure if Docker hub uses deploy keys for repos it has access to thru the integration, but at least previously there was an option to manually add one to repository if it couldn't access it otherwise.
Continue this thread — 2 replies
Their newer GH apps permission model allows fine-grained access to only specific repos (and also only read access e.g.). However their older Oauth flow only allows full access to everything. And 99% of GH integrations still seem to use the older authentication method.
This is also something that many CI providers suffer from. There are only few that already support GH apps.
Definitely wouldn't have helped prevent the compromise.
Continue this thread — 31 replies
See this issue: https://github.com/docker/hub-feedback/issues/873
With how much of the internet blindly pulls images from it, the potential gain from hijacking just one high-profile one would be monumental.
But no, not Docker.
You're totally right; with as important as their registry is to well funded attackers, and as startup-y and "agile" as they are, and as godawful as the security practices are that underlie their tools and standards... they hadn't a chance. They still don't.
There is no reason to expect them to get better.
[0] https://twitter.com/WHHackersBR/status/1118393568656334850
Continue this thread — 8 replies
Why wasn’t that the case before?!
Continue this thread — 4 replies
It wasn't authentication credentials, but still.
Continue this thread — 1 reply
as long as you're using software somewhere in the stack that isn't like maturity level 5, AND you don't have constant audits looking for novel attacks on working-as-intended systems, you're pretty much guaranteed to inherit (or create) a vulnerability at some point, and if you're important enough it will get exploited. the reason that doesn't mean we should start modeling computer systems as "living organisms that eventually get old and die" and should keep modeling security like war is that when you get hit, you can respond. all the layers matter, and insofar as Microsoft or Google do it right, they primarily do it right by having a mature process for monitoring, patching, isolating, etc.
as for docker hub though, yeah i'm totally with you. i'm just saying we shouldn't overestimate the preventive capacity of anyone, honestly. if you're doing anything important over the internet at all, you're making some compromises somewhere.
here are 2 links to things i handwaved at above, for example's sake:
https://www.wired.com/story/microsoft-email-hack-outlook-hot...
https://www.forbes.com/sites/kateoflahertyuk/2018/10/09/goog...
As I understand it, there's no element of signing from the actual devs of an image, just from the central trust service of Docker Hub.
There already have been questionable images hosted there ... just by users uploading compromised images. No hacking needed.
Shortcuts all around -- kind of reminds me of MongoDB. Sad it's the primary player...
How is this issue specific to Docker? Anyone can download a random library off github, use a shady linux distribution, or install utility tools loaded with spyware.
I don't think Docker aims to solve issues relating to trusting upstream software. It's a tool to help package applications, just like how tar allows you to package files. What you put in it is up to you.
Continue this thread — 9 replies
Continue this thread — 7 replies
Strawman. Anyone can use Debian Stable or at least Testing.
Actually only short names go to docker hub, one can setup their own registry and use it via dns names.
Example: docker pull quay.io/letsencrypt/letsencrypt
Continue this thread — 3 replies
Continue this thread — 1 more reply
Continue this thread — 1 more reply
I thought, maybe I need to log out and try if the new password works. I clicked on Log Out link, the website has refreshed and I was still logged in.
Continue this thread — 5 replies
Continue this thread — 4 replies
All comments shown.
Couldn't load more comments. Check your connection and try again.