T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:14
- Finding
- Unpinned Remote Code and Dependencies Are Retrieved and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 14–25 **Vulnerability Type**: Remote payload retrieval and insecure software supply chain **Risk Level**: High ### Vulnerable Code ```bash # Clone the repo into your workspace cd "$CLAWD_WORKSPACE" 2>/dev/null || cd ~/clawd git clone https://github.com/Jzineldin/mission-control.git cd mission-control # Install dependencies + build frontend npm install cd frontend && npm install && npm run build && cd .. # Create your config cp mc-config.default.json mc-config.json # Start (dev) node server.js ``` ### Technical Analysis The installation procedure clones the current default branch of an external Git repository without pinning a reviewed commit, release, or signed tag. It subsequently runs `npm install` for two dependency trees, executes a frontend build, and starts the downloaded server. The effective payload can therefore change after the Skill itself has been reviewed. In addition, npm installation may execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`, which can run arbitrary commands with the installing user's privileges. The instructions do not require checksum or signature verification, lockfile-enforced installation through `npm ci`, dependency auditing, or inspection of lifecycle scripts. The remotely downloaded source code and dependency manifests were not included in the audited artifact, so their behavior could not be verified. ### Attack Path 1. An attacker compromises the remote repository, a maintainer account, or an npm dependency. 2. The attacker adds malicious application code or an npm lifecycle script. 3. A user follows the Skill instructions and clones the mutable default branch. 4. `npm install`, `npm run build`, or `node server.js` executes the modified payload. 5. The payload runs with the user's permissions and can access files available to that account, including OpenClaw configuration data. 6. If the user subsequently ena ...[truncated 594 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin the cloned source to a reviewed commit hash or cryptographically signed release tag. - Publish and verify checksums or signatures before executing downloaded files. - Include the relevant source code, dependency manifests, lockfiles, and service definition in the reviewed Skill artifact. - Use committed lockfiles and `npm ci` rather than unconstrained `npm install`. - Use `npm ci --ignore-scripts` where lifecycle scripts are unnecessary. - If lifecycle scripts are required, document and review each script before installation. - Run dependency auditing and software composition analysis as part of release validation. - Perform installation and builds in an isolated, unprivileged environment with no access to OpenClaw credentials. - Separate software installation from credential configuration so unverified installation scripts cannot access sensitive tokens. ]]>
