T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:9
- Finding
- Unpinned Third-Party Package Installed Globally<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 9–12 and 25–26 **Vulnerability Type**: Unpinned dependency and unsafe global package installation **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: openclaw: install: - kind: node package: "@mtsku/mangadex-cli" bins: [mangadexcli] ``` ```markdown 2. If missing, install: - `npm install -g @mtsku/mangadex-cli` ``` ### Technical Analysis The Skill instructs the agent to install `@mtsku/mangadex-cli` without specifying an exact package version or integrity value. Consequently, installation resolves whichever version the configured npm registry currently serves. The reviewed Skill version does not constrain the installed CLI to a previously audited release. npm packages may execute lifecycle scripts during installation. If the package, one of its transitive dependencies, its publisher account, or the package distribution channel is compromised, installing the mutable version can execute attacker-controlled code. The use of a global installation increases exposure because it places the executable in a shared command location and runs the installation with all privileges held by the invoking user. No evidence establishes that the named package is currently malicious. The vulnerability is the Skill's unsafe and mutable dependency acquisition process. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or a transitive dependency used by `@mtsku/mangadex-cli`. 2. The attacker publishes a malicious version or introduces a malicious installation lifecycle script. 3. An agent follows the Skill's availability check and determines that `mangadexcli` is absent. 4. The agent executes `npm install -g @mtsku/mangadex-cli` without a version or integrity constraint. 5. npm retrieves the attacker-controlled release and may execute its lifecycle scripts. 6. The payload runs with the invoking user's privileges and can acce ...[truncated 519 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the CLI to an audited exact version in both installation metadata and command examples, such as `@mtsku/mangadex-cli@<audited-version>`. 2. Verify package provenance, publisher identity, checksums, signatures, and registry source before installation. 3. Review the pinned package and its transitive dependency tree for lifecycle scripts and known vulnerabilities. 4. Prefer a project-local or isolated installation over `npm install -g`, and execute it from a restricted environment with least privilege. 5. Use a lockfile and integrity metadata where the installation workflow supports them. 6. Disable npm lifecycle scripts with `--ignore-scripts` if the package does not require them; otherwise, explicitly audit all required scripts. 7. Document an update process requiring security review before changing the pinned version. ]]>
