by kortex · 5y ago · 0 comments
That allows an attacker to potentially append some nasty code outside the container and get password-less sudo. Unlikely? Very. But security is all about layers.
I've seen full-fat Ubuntu containers with uid 1000 which is in docker group on the host and ~ mounted to run some python flask app, in production.
If you mount ~ in your containers you have bigger problems than uid 1000.
So then running your containers as that UID without user namespacing (docker’s default) opens you up to more attack surface than if it was uid 1001.