T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:14
- Finding
- Unpinned Global Installation of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md`, line 14 **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium **Vulnerable Code Snippet**: ```markdown 2. Install globally: `npm install -g node-telegram-cli` ``` ### Technical Analysis The installation instruction retrieves the current registry-selected version of `node-telegram-cli` without pinning an exact version or verifying a package integrity hash. Because the package is installed globally, its executable and npm lifecycle scripts run with the installing user's permissions and become available system-wide for that user. The reviewed project contains only `SKILL.md`; it does not include the package implementation, a lockfile, a verified artifact hash, or vendored source. Consequently, the package's implementation—including its claimed OS Keychain credential storage—cannot be verified from the supplied artifact. The effective code may also change after this Skill has been reviewed. This is a supply-chain weakness rather than evidence that the currently published package is malicious. ### Attack Path 1. An attacker compromises the npm publisher account, package publication process, or another relevant supply-chain component. 2. The attacker publishes a malicious release under the same package name. 3. A user follows the Skill instruction and runs `npm install -g node-telegram-cli`. 4. npm resolves the mutable registry version and downloads the compromised package. 5. Malicious lifecycle scripts may execute during installation, or malicious behavior may execute when the `ntg` command is invoked. 6. The package runs with the user's privileges and may access data available to that account, including Telegram data or session material accessible through the CLI. ### Impact Assessment Successful exploitation could execute arbitrary code with the permissions of the user performing the installation or running the CLI. ...[truncated 742 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to an exact, security-reviewed version rather than relying on the registry's current release: ```bash npm install -g node-telegram-cli@<reviewed-exact-version> ``` 2. Record and verify the expected package artifact integrity hash before installation. 3. Include a lockfile, vendored source, or reproducibly built artifact so reviewers can inspect the implementation executed by the Skill. 4. Prefer a project-local installation over a global installation to reduce scope and improve dependency reproducibility. 5. Disable npm lifecycle scripts during installation with `--ignore-scripts` if the reviewed package does not require them. 6. Verify npm provenance and publisher identity as part of installation, rather than merely documenting that provenance exists. 7. Run the CLI under a dedicated, least-privileged operating-system account and restrict access to Telegram session material and downloaded media. 8. Document a tested version-upgrade procedure requiring source review, integrity verification, and security testing before changing the pinned version.
