Full control of the Docker daemon, which is effectively root access to the host
It gives full control of the Docker daemon, which is effectively root on the host. Anyone who can talk to the Docker socket can start a privileged container. That container can mount the host's whole root filesystem.
The other options are wrong:
• "Read-only access to other containers' logs" is wrong. The socket accepts every Docker command, not only reads.
• "Nothing beyond what any container can do, because the socket is namespaced" is wrong. The socket is not namespaced. It talks straight to the host's daemon.
• "Access only to the containers in the same Compose project" is wrong. Docker has no per-project limits on the socket.
Read more
- Docker security (https://docs.docker.com/engine/security/)docs.docker.com