T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/start_overlay_server.sh:4- Finding
Unauthenticated LAN Exposure of the Entire Workspace
- Content
View full analysis
Vulnerability Details
File Location:
scripts/start_overlay_server.sh, lines 4-13
Vulnerability Type: Excessive file exposure and missing network access controls
Risk Level: HighVulnerable Code
bash WORKSPACE="${OPENCLAW_WORKSPACE:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)}" PORT="${OVERLAY_PORT:-8787}" LOG="$WORKSPACE/streaming-tests/http-server.log" mkdir -p "$WORKSPACE/streaming-tests" if ss -ltn | grep -q ":$PORT "; then echo "Overlay server already listening on :$PORT" else nohup python3 -m http.server "$PORT" --directory "$WORKSPACE" > "$LOG" 2>&1 &Technical Analysis
The script starts Python's basic HTTP server with the entire workspace as its document root. By default,
python3 -m http.serverlistens on all available network interfaces and provides directory listings. The server has no authentication, authorization, or transport encryption.The legitimate requirement is to make a small set of OBS overlay assets available to an OBS host. Serving the workspace root exceeds that requirement and may expose unrelated source files, configuration files, logs, agent state, and other material stored beneath the workspace.
The process is also launched through
nohupin the background. Although this is not an operating-system startup mechanism, it allows the exposure to continue after the launching shell exits, and the project provides no corresponding shutdown command.Attack Path
- An operator executes
scripts/start_overlay_server.sh. - The script starts an HTTP server on port 8787 and binds it to all interfaces by default.
- The complete workspace becomes the server's document root.
- A host with network access to port 8787 requests
/and uses generated directory listings to enumerate files. - The host requests accessible workspace files directly and downloads their contents without authentication.
No local account or OBS WebSocket credential is required for this attack; the attacker onl ...[truncated 602 chars]
- An operator executes
- Remediation
View remediation
Remediation Suggestions
- Serve only a dedicated public directory containing the required overlay files, rather than the workspace root.
- Copy or symlink explicitly approved assets into a deployment directory that cannot contain secrets or unrelated project files.
- Bind the server to a specific trusted interface using
--bind, based on the intended OBS deployment model. - Restrict port 8787 through host firewall rules so that only the OBS host can connect.
- Disable directory listing by replacing the development HTTP server with a minimally configured production server or a custom handler.
- Use authenticated HTTPS when overlays must cross an untrusted network.
- Record the spawned process ID and provide a stop command that reliably terminates the server.
- Validate
OPENCLAW_WORKSPACEandOVERLAY_PORTbefore use. - Add documentation warning operators not to place credentials in any directory exposed to OBS.
A safer structure would resemble:
bash OVERLAY_ROOT="$WORKSPACE/streaming" python3 -m http.server "$PORT" \ --bind "$TRUSTED_BIND_ADDRESS" \ --directory "$OVERLAY_ROOT"The selected root must contain only files intended for network publication.
