T05 · Unauthorized Access and Privilege Escalation
- Location
assets/https-server.py:84- Finding
Authentication Bypass on the Transcription Proxy Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does what it advertises, but its persistent HTTPS proxy has weak authentication that can expose the local transcription service if LAN access is enabled.
Review this before installing if you plan to expose the proxy beyond localhost. It creates a persistent user systemd service and changes OpenClaw allowed origins. Keep VOICE_HOST on 127.0.0.1 unless you understand the LAN risk, and avoid putting gateway tokens in URLs or shell commands where they may be logged. This does not look malicious, but the authentication weakness should be fixed before trusting it on a shared network.
assets/https-server.py:84Authentication Bypass on the Transcription Proxy Endpoint
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
loop = asyncio.get_event_loop()
resp = await loop.run_in_executor(
None,
lambda: urllib.request.urlopen(req, timeout=120),
)
data = resp.read(MAX_RESPONSE_BODY + 1)
if len(data) > MAX_RESPONSE_BODY:
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
echo "[1/4] Stopping and removing openclaw-voice-https.service..."
systemctl --user stop openclaw-voice-https.service 2>/dev/null || true
systemctl --user disable openclaw-voice-https.service 2>/dev/null || true
rm -f "$HOME/.config/systemd/user/openclaw-voice-https.service"
systemctl --user daemon-reload 2>/dev/null || true
echo " done."
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
rm -rf "$CERT_DIR"
echo " removed: $CERT_DIR"
fi
rm -f "$VOICE_DIR/https-server.py"
rmdir "$VOICE_DIR" 2>/dev/null && echo " removed: $VOICE_DIR" || true
echo ""
The skill advertises meaningful capabilities including environment access, file modification, shell execution, persistence, and network exposure, but does not declare any explicit tool scope such as permissions or allowed-tools. This weakens reviewability and policy enforcement because operators cannot easily constrain what the skill is allowed to do, especially given that it installs a persistent HTTPS proxy and modifies config files.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- VOICE_ALLOWED_ORIGIN (optional, default: https://<VOICE_HOST>:<VOICE_HTTPS_PORT>)
persistence:
- "User systemd service: openclaw-voice-https.service (HTTPS/WSS proxy)"
privileges: user-level only, no root/sudo required
dependencies:
- python3 with aiohttp >= 3.9.0 (pip)
- openssl (for self-signed cert generation)
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
### TLS
- **TLS 1.2+ enforced**: Minimum protocol version set to TLS 1.2. Legacy SSL/TLS 1.0/1.1 rejected.
- **Self-signed TLS**: Auto-generated certificate. Browser certificate warning on first access.
- **Private key permissions**: `chmod 600` on TLS key file.
### Authentication
- **Bearer token auth**: `/transcribe` endpoint validates Bearer token against gateway auth token using constant-time comparison (`hmac.compare_digest`).
The skill establishes persistence via a user systemd service that starts automatically on boot/login. Persistence is not inherently malicious in infrastructure software, but it is security-relevant because it creates a long-lived network-facing proxy whose exposure may outlast user awareness, particularly if VOICE_HOST is set to a LAN IP.
- No telemetry, analytics, or phone-home behavior.
### Persistence
- User systemd service starts on boot. Use `uninstall.sh` to fully revert.
## What this skill modifies
Creating and enabling a persistent user-level systemd unit is a genuine persistence mechanism. In this skill's context the purpose appears operational, but the behavior still increases attack surface because it ensures the HTTPS proxy remains active across sessions and may continue exposing local services if misconfigured.
| What | Path | Action |
|---|---|---|
| Gateway config | `~/.openclaw/openclaw.json` | Adds HTTPS origin to `gateway.controlUi.allowedOrigins` |
| Systemd service | `~/.config/systemd/user/openclaw-voice-https.service` | Creates + enables persistent HTTPS proxy |
| Runtime file | `~/.openclaw/workspace/voice-input/https-server.py` | Copies proxy server |
| TLS certs | `~/.openclaw/workspace/voice-input/certs/` | Auto-generated self-signed cert on first run |
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
return explicit
try:
# Safe: fixed argument list, no user input, no shell=True
npm_root = subprocess.check_output(["npm", "-g", "root"], text=True, stderr=subprocess.DEVNULL).strip()
candidate = os.path.join(npm_root, "openclaw", "dist", "control-ui")
if os.path.isdir(candidate):
return candidate
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
return
# Safe: fixed argument list, no user input, no shell=True
subprocess.run([
"openssl", "req", "-x509", "-nodes", "-newkey", "rsa:2048",
"-keyout", str(key_path),
"-out", str(cert_path),
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
return
# Safe: fixed argument list, no user input, no shell=True
subprocess.run([
"openssl", "req", "-x509", "-nodes", "-newkey", "rsa:2048",
"-keyout", str(key_path),
"-out", str(cert_path),
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
"-subj", "/CN=openclaw-voice-local",
], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
# SECURITY: Ensure private key is not group/world-readable
os.chmod(str(key_path), 0o600)
The troubleshooting guidance instructs users to place gateway tokens directly in a URL query string and in CLI arguments. These tokens can be exposed through browser history, server and proxy logs, shell history, process listings, and screenshots or copied commands, increasing the chance of credential leakage and unauthorized access to the gateway.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
UNIT
systemctl --user daemon-reload
systemctl --user enable --now openclaw-voice-https.service
systemctl --user restart openclaw-voice-https.service
# 5) Restart gateway so allowedOrigins applies