-
-
Notifications
You must be signed in to change notification settings - Fork 54.7k
Description
Summary
The Hostinger VPS Docker Compose template (ghcr.io/hostinger/hvps-openclaw) does not mount /var/run/docker.sock into the OpenClaw container. This prevents the built-in sandbox feature (agents.defaults.sandbox) from functioning, leaving agent code execution without container-level isolation.
Environment
- Hosting: Hostinger VPS (Docker Compose template)
- Image:
ghcr.io/hostinger/hvps-openclaw:latest(v2026.2.23) - Host OS: Ubuntu 24.04.3 LTS, Docker 29.2.1
Current State
The container runs with:
Privileged: false- No Docker socket mount
- No additional Linux capabilities (
CapAdd: []) - No Docker binary inside the container
All agent-executed commands run directly inside the gateway container, sharing the filesystem, network, and access to credentials in /data/.openclaw/.
Requested Change
The Hostinger template docker-compose.yml should include:
volumes:
- /var/run/docker.sock:/var/run/docker.sockAnd the Docker CLI binary should be available inside the container.
Security Impact
Without sandbox (current)
A successful prompt injection → RCE gives the attacker access to:
| Asset | Exposure |
|---|---|
openclaw.json |
Bot tokens (Telegram, WhatsApp), API keys, auth tokens |
credentials/ |
Stored provider credentials |
| Network | Unrestricted outbound from container |
| Filesystem | Full read/write to agent data, memory, workspace |
With sandbox (requested)
- Filesystem isolation — sandbox has no access to
/data/.openclaw/or credentials - Network restriction — configurable
--network=none - Resource limits — separate CPU/memory per sandbox
- Auto-cleanup — ephemeral containers removed after execution
Attack scenario
| Step | Without sandbox | With sandbox |
|---|---|---|
| Attacker sends crafted message via Telegram | Agent processes it | Agent processes it |
| Agent tricked into running shell command | Executes in gateway container | Executes in isolated sandbox |
cat /data/.openclaw/openclaw.json |
Succeeds — tokens exposed | File does not exist in sandbox |
curl exfiltrates data |
Sends tokens to attacker | Network blocked or restricted |
| Cleanup | Attacker may persist | Sandbox auto-destroyed |
Risk of the Change
Mounting /var/run/docker.sock introduces a privilege escalation path. However:
- The OpenClaw container is the only workload on single-tenant Hostinger VPS instances
- Docker socket is already accessible to
rooton host - Security gained (sandbox isolation) far outweighs theoretical socket risk
- This is the officially recommended deployment model per docs.openclaw.ai/install/docker
Alternatives
If socket mount is not acceptable for the template:
- User-configurable volumes — let customers edit compose volumes in hPanel
- Rootless Docker / Sysbox — safer nested container support
- Documentation — note that sandbox is unavailable on Hostinger template
Expected Config After Fix
{
"agents": {
"defaults": {
"sandbox": {
"mode": "non-main",
"scope": "agent",
"workspaceAccess": "none"
}
}
}
}