T03 · Remote Payload Retrieval and Execution
Warning
- Location
- SKILL.md:34
- Finding
- Mutable External Repository Is Retrieved and Executed Without Version Pinning## Vulnerability Details **File Location**: `SKILL.md`, lines 34-39 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Medium **Vulnerable Code:** ```bash git clone https://github.com/zxcnny930/buzz.git cd buzz npm install cp config.example.json config.json # Edit config.json and set dashboard.password before starting npm start ``` ### Technical Analysis The setup procedure clones the current default branch of an external repository without pinning a reviewed commit, tag, or release checksum. It then installs third-party packages and executes the retrieved application. Consequently, the code that runs is not contained in the audited artifact and can change after this Skill has been reviewed. The use of `npm install` can also execute package lifecycle scripts and resolve dependency versions according to the remotely retrieved package metadata. No malicious upstream content was observed in the supplied project files; the risk arises from trusting mutable, externally controlled code at installation time. ### Attack Path 1. An attacker compromises the referenced repository, its maintainer account, or a dependency included by the remote project. 2. The attacker adds a malicious payload to the default branch, a dependency, or an npm lifecycle script. 3. A user follows the documented installation procedure and clones the mutable repository state. 4. `npm install` installs dependencies and may execute lifecycle scripts. 5. `npm start` executes the externally supplied application with the user's local privileges. 6. The payload can access resources available to that process, potentially including the service configuration and credentials stored in `config.json`. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the user running the setup commands. The accessible scope may include project files, environment variables, network access, ...[truncated 275 chars]
- Remediation
- ## Remediation Suggestions - Pin the repository to a reviewed commit hash or cryptographically signed release instead of cloning and executing the mutable default branch. - Publish and verify a checksum or signature for the expected source archive and lockfile. - Include a reviewed dependency lockfile and use `npm ci` for reproducible installation. - Use `npm ci --ignore-scripts` where package lifecycle scripts are unnecessary. - If lifecycle scripts are required, document and audit each script before execution. - Run the service under a dedicated, unprivileged account with access limited to its own working directory and required network destinations. - Audit the retrieved source and dependency tree before invoking `npm start`. - Consider packaging reviewed executable code with the Skill rather than retrieving mutable code during setup.
