CRITICAL: Volume mounts allow access to any host path (Docker socket, /etc/shadow, etc.) #111
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Users can mount any absolute path on the host into their containers. The
ValidateVolumePathfunction only checks that the path is absolute and clean — it does NOT restrict which paths are allowed.Location
internal/handlers/app.go—HandleVolumeAdd(),HandleVolumeEdit(),validateVolumePaths()internal/handlers/app.go—ValidateVolumePath()(only checks absolute + clean)Impact
An authenticated user can:
/var/run/docker.sock→ full Docker API access = host root/etc/shadow→ read password hashes/→ read/write entire host filesystem/procor/sys→ container escape vectorsThis is the most severe security issue for a PaaS platform.
Current Code
Suggested Fix
Option A (Recommended): Restrict host paths to a configured base directory
Add
UPAAS_VOLUME_BASE_DIRconfig (e.g.,/var/lib/upaas/volumes/) and restrict all host volume mounts to be under that directory.Option B: Explicit deny list for dangerous paths (
/var/run/docker.sock,/proc,/sys,/etc,/root, etc.) — less secure but simpler.Option C: Use Docker named volumes instead of bind mounts — most secure, avoids host path access entirely.
Severity
CRITICAL — This is a trivially exploitable host compromise via the web UI or API.
WONTFIX, working as intended