T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:74
- Finding
- Unpinned Package Execution in Installation Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:74-77` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```bash # One-command installation using the skills CLI npx skills add zhaoxinghua09-cell/agent-skills -g ``` ### Technical Analysis The installation instructions invoke `npx skills` without specifying an exact package version or verifying the integrity of the downloaded package. Depending on the local npm configuration and cache state, `npx` may retrieve and execute the currently published version of the `skills` package from an external package registry. The executable code resolved by this command can therefore change after this Skill has been reviewed. The repository identifier passed to the package does not protect the user from a compromised, replaced, or unexpectedly modified npm package responsible for processing the installation. The `-g` option also requests global installation of the Skill. Although this does not inherently provide administrative privileges, it expands the installation scope and may write to a global user-level or system-level location, depending on the npm configuration and the privileges used to run the command. ### Attack Path 1. An attacker compromises the publisher account, release process, or registry entry for the unpinned `skills` npm package. 2. The attacker publishes a malicious version under the package name resolved by `npx skills`. 3. A user follows the documented installation command. 4. `npx` downloads and executes the malicious package version. 5. The malicious package runs with the privileges of the invoking user and can access resources available to that account. 6. If the command is run with elevated privileges, the malicious package may obtain the same elevated scope. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the user running the installation command. Potentially ex ...[truncated 463 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the installer package to a reviewed exact version, for example: ```bash npx --yes skills@X.Y.Z add zhaoxinghua09-cell/agent-skills -g ``` 2. Document the expected package publisher, registry, version, and integrity hash. 3. Prefer installation through a lockfile-backed process or a locally verified installer. 4. Avoid global installation unless it is required. Prefer a user-scoped or project-scoped destination. 5. Pin the source repository to a reviewed commit hash or signed release tag rather than relying on a mutable branch. 6. Advise users not to execute the installer with administrative or root privileges. 7. Where practical, provide a manual installation procedure that downloads a fixed release archive and verifies its checksum before extracting it. ]]>
