T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:20
- Finding
- Unpinned Global Installation of a Third-Party npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 20-24; duplicated in `README.md`, lines 42-46 **Vulnerability Type**: Unpinned and globally installed third-party dependency **Risk Level**: Medium ### Vulnerable Code ```markdown Ensure the `moltext` CLI is installed in your environment: ```bash npm install -g moltext ``` ``` ### Technical Analysis The installation command retrieves the current `moltext` package release from the configured npm registry without specifying an exact version, lockfile, or integrity hash. Consequently, the executable installed when a user follows these instructions can differ from the package version that existed when this Skill was audited. The `-g` option installs the package globally. Depending on the npm configuration and user privileges, this can expose a broader environment than a project-local installation. npm packages can also define lifecycle scripts, such as `preinstall`, `install`, and `postinstall`, which npm may execute during installation. This finding does not establish that the current `moltext` package is malicious. The risk arises because the Skill depends on mutable, externally supplied package content without reproducible verification. ### Attack Path 1. An attacker compromises the package, a maintainer account, or the package distribution path. 2. The attacker publishes a malicious release under the expected `moltext` package name. 3. A user or Agent follows the Skill instructions and runs `npm install -g moltext`. 4. npm retrieves the latest mutable release rather than a previously audited version. 5. Malicious package code or lifecycle scripts execute with the privileges of the account running npm. 6. The globally installed executable remains available to subsequent commands and users covered by the global npm prefix. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the installing account. Depending on those privileges, the attac ...[truncated 362 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin the CLI to an exact, audited version, for example `moltext@x.y.z`. - Prefer a project-local dependency managed by a committed lockfile instead of a global installation. - Verify package provenance, registry origin, checksums, and signatures where supported. - Use npm lockfile integrity metadata and reproducible installation commands such as `npm ci`. - Consider suppressing lifecycle scripts with `--ignore-scripts` if the package functions correctly without them. - Run installation and execution under a dedicated, least-privileged account or sandbox. - Document the audited package version and establish a controlled process for reviewing upgrades. ]]>
