T08 · Insecure Dependencies
Error
- Location
- scripts/setup_hi_light.sh:3
- Finding
- Unpinned and Environment-Overridable Third-Party Plugin Installation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/setup_hi_light.sh`, lines 3 and 101-103 **Vulnerability Type**: Untrusted and unpinned third-party dependency installation **Risk Level**: High ### Vulnerable Code ```bash PLUGIN_SPEC="${PLUGIN_SPEC:-@art_style666/hi-light}" ``` ```bash if [[ "$INSTALL_PLUGIN" -eq 1 ]]; then echo "[INFO] Installing plugin ${PLUGIN_SPEC}" run_cmd openclaw plugins install "$PLUGIN_SPEC" ``` ### Technical Analysis The setup script installs `@art_style666/hi-light` without an exact version or integrity pin. As a result, the code installed during a future setup can differ from the package version originally reviewed. The package specification can also be replaced through the inherited `PLUGIN_SPEC` environment variable. No validation restricts that value to the intended package name, version, registry, or integrity digest. An attacker who can influence the execution environment can therefore cause the setup script to install a different package. The script subsequently enables the plugin, placing the installed dependency within the OpenClaw runtime trust boundary: ```bash run_cmd openclaw plugins enable "$PLUGIN_ID" ``` ### Attack Path 1. An attacker compromises the upstream package or publishes a malicious future version under the same package name; alternatively, the attacker controls the `PLUGIN_SPEC` environment variable in the environment where setup runs. 2. The user invokes the documented setup script without `--skip-install`. 3. `openclaw plugins install` resolves and installs the unpinned or attacker-selected package. 4. The script enables the plugin. 5. Code supplied by that plugin can run within the permissions and data-access scope granted to OpenClaw plugins. ### Impact Assessment Successful exploitation can introduce arbitrary plugin behavior into OpenClaw. The resulting privileges depend on OpenClaw's plugin isolation model, but may include access to OpenClaw configuration, channel data, cre ...[truncated 330 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the plugin to a reviewed, immutable version, for example an exact package version rather than an unconstrained package name. 2. Verify the package with a trusted integrity hash, lockfile, signature, or registry-supported provenance mechanism. 3. Remove the `PLUGIN_SPEC` environment override unless it is strictly required. 4. If configurability is required, validate the value against an explicit allowlist of approved package names, versions, and registries. 5. Prevent installation from arbitrary registries or local package paths. 6. Require explicit user confirmation showing the exact package identity and version before installation. 7. Review and update the pinned dependency through a controlled security-review process. 8. Run plugins with the minimum filesystem, credential, and network privileges supported by OpenClaw. ]]>
