mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-14 11:06:15 +05:00
The Mounts feature (application/compose/database services) let any member with volume:create access set an arbitrary bind mount hostPath, with zero validation. Since generateBindMounts wires that path straight into the Swarm service spec, a non-privileged member could mount /var/run/docker.sock, /etc/dokploy, or other host-critical paths and escalate to root on the Dokploy control host - same impact as bringing your own docker-compose.yml with a docker.sock mount, but reachable through the plain Mounts UI on any service type. Add isDangerousBindMountPath() with a fixed blocklist of host-critical paths (docker.sock, /etc/dokploy, /root, /boot, /proc, /sys, docker's data dir) and isPrivilegedOrgRole(); mount.create/update now reject a bind mount targeting one of those paths unless the caller is the org's owner or admin. Single-user self-hosted installs are unaffected - the sole user is always the owner. |
||
|---|---|---|
| .. | ||
| server | ||