other
Note
- Location
- server-health.sh:44
- Finding
- Excessive Disclosure of Privileged Host and OpenClaw Operational Metadata<![CDATA[ ## Vulnerability Details **File Location**: `server-health.sh:44-75`, `server-health.sh:118-122`, and `server-health.sh:174-175` **Vulnerability Type**: Excessive System Reconnaissance and Information Disclosure **Risk Level**: Low ### Vulnerable Code ```bash get_top_processes() { ps aux --sort=-%cpu | awk 'NR>1 {printf "%-12s %3d%% %5dMB\n", $11, int($3), int($6/1024)}' | head -3 } get_openclaw_pid() { pgrep -f "openclaw.*gateway" | head -1 || echo "" } get_openclaw_version() { # Get version from package.json instead of CLI (CLI can hang) if [[ -f /usr/lib/node_modules/openclaw/package.json ]]; then jq -r '.version // "unknown"' /usr/lib/node_modules/openclaw/package.json 2>/dev/null else echo "unknown" fi } get_openclaw_config() { if [[ -f /root/.openclaw/openclaw.json ]]; then local port=$(jq -r '.gateway.port // 18789' /root/.openclaw/openclaw.json 2>/dev/null) local model=$(jq -r '.agents.defaults.model.primary // "unknown"' /root/.openclaw/openclaw.json 2>/dev/null) local fallbacks=$(jq -r '.agents.defaults.model.fallbacks // [] | map(split("/")[1] // .) | join(" → ")' /root/.openclaw/openclaw.json 2>/dev/null) echo "${port} ${model} ${fallbacks}" else echo "18789 unknown " fi } get_docker_containers() { if command -v docker &>/dev/null; then docker ps -q 2>/dev/null | wc -l else echo "0" fi } ``` The standard output additionally exposes session metadata: ```bash # Simplified - just count session files local sessions=$(ls /root/.openclaw/agents/main/sessions/*.json 2>/dev/null | wc -l || echo "0") ``` ### Technical Analysis The script gathers system-wide process information, identifies the OpenClaw gateway process, reads package and configuration data, queries Docker, and counts session files under a root-owned directory. These operations are read-only and broadly align with the stated monitoring purpose. However, ...[truncated 2538 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Run the skill under a dedicated, least-privileged service account rather than `root`. 2. Restrict invocation through the surrounding OpenClaw or automation interface to authenticated and explicitly authorized administrators. 3. Make sensitive checks opt-in, for example: - `--processes` - `--openclaw-config` - `--sessions` - `--docker` 4. Exclude process command names, process IDs, gateway ports, software versions, model configuration, and session counts from output intended for remote or untrusted recipients. 5. Provide a redacted mode that returns only high-level health states such as `healthy`, `warning`, or `unavailable`. 6. Avoid hardcoded access to `/root/.openclaw`. Resolve an explicitly configured OpenClaw data directory and verify that the caller is authorized to inspect it. 7. Apply output-level access controls so privileged diagnostic details are not relayed to public channels, group chats, logs, or monitoring systems with broader readership. 8. Document the permissions required for each check and disable checks when the execution account lacks a legitimate operational need for that data. ]]>
