T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:47
- Finding
- Unpinned Third-Party CLI Installation and Execution## Vulnerability Details **File Location**: `SKILL.md:47`, `SKILL.md:50`, and `SKILL.md:68` **Vulnerability Type**: Unpinned third-party dependency installation and execution **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @iqinghu/qhkit npx @iqinghu/qhkit <command> ... npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill directs the Agent to install or execute `@iqinghu/qhkit` without pinning it to a reviewed version or integrity digest. The `@latest` upgrade explicitly selects whichever release the registry currently designates as latest. An unversioned `npx` invocation can likewise download and immediately execute a release that was not present when the Skill was audited. The global installation also creates a broader system-level modification than a project-local or isolated installation. Although the instructions do not request root access, the package and its npm lifecycle scripts execute with all permissions held by the Agent user. This is a supply-chain exposure rather than evidence that the current package is malicious. Exploitation requires compromise of the package publisher, registry resolution path, distribution mirror, or a future package release. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution channel, or a future release of `@iqinghu/qhkit`. 2. The attacker publishes a malicious release and causes it to be selected by an unversioned installation, `@latest`, or `npx`. 3. The Agent follows the Skill instructions and downloads the malicious package. 4. npm lifecycle scripts or the CLI entry point execute under the Agent user's identity. 5. The malicious code accesses files, environment variables, configured API credentials, and network resources available to that user. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the Agent user. This could expose the `QHKIT_TOKE ...[truncated 413 chars]
- Remediation
- ## Remediation Suggestions - Pin `@iqinghu/qhkit` to a specifically audited version instead of using an unversioned package or `@latest`. - Record and verify the expected npm integrity digest through a lockfile or equivalent trusted manifest. - Prefer a project-local, isolated installation rather than `npm i -g`. - Avoid automatic `npx` downloads. Configure `npx` to use an already installed, verified package. - Disable npm lifecycle scripts during installation where compatible with the package. - Require explicit user approval before installing or upgrading executable dependencies. - Review release provenance and package signatures before accepting an upgrade. - Run the CLI in a sandbox with access limited to the specific media files required for the task and only the necessary credentials.
