T08 · Insecure Dependencies
Warning
- Location
- examples/openclaw.config.example.json5:23
- Finding
- Third-Party MCP Package Is Retrieved and Executed with Access to the NovelAI Credential<![CDATA[ ## Vulnerability Details **File Location**: `examples/openclaw.config.example.json5:23-29`; equivalent configuration is documented in `docs/FULL-USER-MANUAL.md:116-125` **Vulnerability Type**: Supply-chain exposure through runtime package retrieval and execution **Risk Level**: Medium ### Complete Code Snippet ```json5 "novelai-image": { command: "uvx", // Pin the audited upstream release; do not silently follow latest. args: ["--from", "novelai-image-mcp==0.4.0", "novelai-image-mcp", "serve"], env: { NOVELAI_TOKEN: "${NOVELAI_TOKEN}", }, }, ``` ### Technical Analysis The configuration instructs `uvx` to retrieve and execute the separately maintained `novelai-image-mcp` package. Pinning the package to version `0.4.0` reduces exposure to silent version upgrades, but it does not establish artifact integrity because no package hash, immutable artifact digest, or fully locked transitive dependency graph is enforced. The launched package receives `NOVELAI_TOKEN` directly in its environment. It also necessarily has network access for NovelAI operations and may inherit the filesystem permissions of the OpenClaw Gateway account. Consequently, compromise of the package publisher, package registry, referenced release, or an unresolved transitive dependency could turn the MCP process into a credential or data-exfiltration mechanism. The repository explicitly identifies this MCP server as an independent third-party dependency and advises operators to review it. There is no evidence that the package is currently malicious; the vulnerability is the trust and execution model. ### Attack Path 1. An attacker compromises the package publisher account, package registry, pinned release artifact, or a transitive dependency resolved by `uvx`. 2. The operator starts OpenClaw using the supplied MCP configuration. 3. `uvx` retrieves and executes the compromised package. 4. OpenClaw passes `NOVELAI_TOKEN` into the MCP process environment. 5. Malicious pac ...[truncated 803 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Install the MCP server from an operator-reviewed, immutable artifact instead of resolving it dynamically whenever the service starts. 2. Lock and verify the complete dependency graph with cryptographic hashes, including transitive dependencies. 3. Verify package provenance, signatures, publisher identity, and release artifacts before deployment. 4. Run the MCP server under a dedicated low-privilege operating-system account or isolated container. 5. Restrict filesystem access to only required input and output directories. 6. Restrict outbound network access to the documented NovelAI endpoints. 7. Supply a narrowly scoped or revocable credential where the provider supports one, and rotate it after any suspected dependency compromise. 8. Preserve the existing version pin and require explicit review, smoke testing, and integrity verification before upgrades. 9. Avoid granting broad tool permissions merely to support the MCP server; use the narrowest host allowlist available. ]]>
