T03 · Remote Payload Retrieval and Execution
- Location
scripts/install.sh:87- Finding
Mutable Remote Installer Is Downloaded and Executed Directly
- Content
View full analysis
Vulnerability Details
File Location:
scripts/install.sh:87-93
Additional Locations:scripts/web-ui.py:255-285;openclaw-integration/gateway/memory.ts:212-228
Vulnerability Type: Remote payload retrieval and execution
Risk Level: CriticalVulnerable Code
sh curl -sSf https://install.surrealdb.com | shpython if system == "darwin": if shutil.which("brew"): result = subprocess.run( ["brew", "install", "surrealdb/tap/surreal"], capture_output=True, text=True, timeout=300 ) else: result = subprocess.run( ["sh", "-c", "curl -sSf https://install.surrealdb.com | sh"], capture_output=True, text=True, timeout=300 ) elif system == "linux": result = subprocess.run( ["sh", "-c", "curl -sSf https://install.surrealdb.com | sh"], capture_output=True, text=True, timeout=300 )ts async function installSurrealDb(): Promise<{ success: boolean; stdout?: string; stderr?: string; error?: string; }> { try { const { stdout, stderr } = await execAsync( "curl -sSf https://install.surrealdb.com | sh", { timeout: 300000 }, ); return { success: true, stdout, stderr }; } catch (e) { return { success: false, error: e instanceof Error ? e.message : String(e), }; } }Technical Analysis
The project downloads a mutable script from an external URL and passes it directly to a shell. There is no pinned version, local inspection step, hardcoded digest, or signature verification. Consequently, the effective executable payload can change after the Skill has been reviewed.
The command-line installer now makes this behavior opt-in and asks for confirmation. However, the standalone web UI and gatewa ...[truncated 1152 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove every
curl | shandsh -cnetwork-installer path. - Download a version-pinned release artifact as data rather than executable shell input.
- Verify it against a hardcoded vendor signing key or an expected SHA-256 digest obtained through a separate trusted channel.
- Fail closed if signature, digest, version, platform, or expected filename validation fails.
- Present the verified artifact and version to the user before installation.
- Remove binary installation from unattended auto-repair and gateway handlers.
- Prefer documentation that directs users to the operating system's trusted package manager or a manually verified vendor release.
- Remove every
