Docker socket esposto: root sull'host in una riga
Il demone Docker gira come root e ascolta su /var/run/docker.sock. Chi può scrivere su quel socket può creare container che controllano l'host.
L'abuso
Se il socket è montato dentro un container (comune nei CI), da lì lanci un nuovo container privilegiato che monta / dell'host:
docker -H unix:///var/run/docker.sock run -v /:/host --privileged \
-it alpine chroot /host sh # sei root sull'hostEsporre il socket su TCP senza TLS/mutua autenticazione è ancora peggio: root remoto per chiunque lo raggiunga.
Difesa
Non montare il docker socket nei container; se un CI ne ha bisogno, usa soluzioni rootless o socket proxy con permessi filtrati. Mai esporre l'API su TCP senza TLS e client cert. Preferisci runtime rootless (Podman) e sysbox.