T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 14
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable 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-cliwithout 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
- An attacker compromises the npm publisher account, package publication process, or another relevant supply-chain component.
- The attacker publishes a malicious release under the same package name.
- A user follows the Skill instruction and runs
npm install -g node-telegram-cli. - npm resolves the mutable registry version and downloads the compromised package.
- Malicious lifecycle scripts may execute during installation, or malicious behavior may execute when the
ntgcommand is invoked. - 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
View remediation
Remediation Suggestions
- 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> - Record and verify the expected package artifact integrity hash before installation.
- Include a lockfile, vendored source, or reproducibly built artifact so reviewers can inspect the implementation executed by the Skill.
- Prefer a project-local installation over a global installation to reduce scope and improve dependency reproducibility.
- Disable npm lifecycle scripts during installation with
--ignore-scriptsif the reviewed package does not require them. - Verify npm provenance and publisher identity as part of installation, rather than merely documenting that provenance exists.
- Run the CLI under a dedicated, least-privileged operating-system account and restrict access to Telegram session material and downloaded media.
- Document a tested version-upgrade procedure requiring source review, integrity verification, and security testing before changing the pinned version.
- Pin the dependency to an exact, security-reviewed version rather than relying on the registry's current release:
