Users can mount any absolute path on the host into their containers. The ValidateVolumePath function only checks that the path is absolute and clean — it does NOT restrict which paths are allowed.
Mount /var/run/docker.sock → full Docker API access = host root
Mount /etc/shadow → read password hashes
Mount / → read/write entire host filesystem
Mount other apps' data directories → cross-tenant data access
Mount /proc or /sys → container escape vectors
This is the most severe security issue for a PaaS platform.
Current Code
funcValidateVolumePath(pstring)error{ifp==""{returnErrVolumePathEmpty}if!filepath.IsAbs(p){returnErrVolumePathNotAbsolute}cleaned:=filepath.Clean(p)ifcleaned!=p{returnErrVolumePathNotClean}returnnil// ANY absolute path is accepted!}
Suggested Fix
Option A (Recommended): Restrict host paths to a configured base directory
funcValidateVolumePath(pstring,allowedBasestring)error{// ... existing checks ...// Host paths must be under the allowed baseif!strings.HasPrefix(filepath.Clean(p),filepath.Clean(allowedBase)){returnErrVolumePathOutsideAllowed}returnnil}
Add UPAAS_VOLUME_BASE_DIR config (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.
## Summary
Users can mount **any absolute path** on the host into their containers. The `ValidateVolumePath` function 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:
1. Mount `/var/run/docker.sock` → **full Docker API access = host root**
2. Mount `/etc/shadow` → read password hashes
3. Mount `/` → read/write entire host filesystem
4. Mount other apps' data directories → **cross-tenant data access**
5. Mount `/proc` or `/sys` → container escape vectors
This is the most severe security issue for a PaaS platform.
## Current Code
```go
func ValidateVolumePath(p string) error {
if p == "" { return ErrVolumePathEmpty }
if !filepath.IsAbs(p) { return ErrVolumePathNotAbsolute }
cleaned := filepath.Clean(p)
if cleaned != p { return ErrVolumePathNotClean }
return nil // ANY absolute path is accepted!
}
```
## Suggested Fix
Option A (Recommended): **Restrict host paths to a configured base directory**
```go
func ValidateVolumePath(p string, allowedBase string) error {
// ... existing checks ...
// Host paths must be under the allowed base
if !strings.HasPrefix(filepath.Clean(p), filepath.Clean(allowedBase)) {
return ErrVolumePathOutsideAllowed
}
return nil
}
```
Add `UPAAS_VOLUME_BASE_DIR` config (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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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