T08 · Insecure Dependencies
- Location
SKILL.md:12- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 12 and 45
Vulnerability Type: T08: Insecure Dependencies
Risk Level: MediumVulnerable code snippets:
yaml required_binaries: - name: tg package: tg-mtproto-cli install: npm install -g tg-mtproto-cli registry: https://www.npmjs.com/package/tg-mtproto-cli source: https://github.com/cyberash-dev/tg-mtproto-climarkdown | `tg` | `npm install -g tg-mtproto-cli` | Core CLI |Technical Analysis
The Skill instructs users to install the mutable latest release of
tg-mtproto-cliglobally from npm without pinning an exact version or integrity digest. npm installation can execute package lifecycle scripts with the invoking user's privileges. Referencing a GitHub repository does not cryptographically establish that the npm artifact corresponds to reviewed source.This dependency handles particularly sensitive resources: Telegram API credentials, system-keychain data, session databases containing authorization keys, private messages, and downloaded media. No evidence in
SKILL.mdindicates that the package is presently malicious, but the installation method leaves users exposed to a future malicious release or compromise of the publisher or registry account.The separately flagged outbound Telegram traffic is necessary for the declared MTProto functionality. The audited file does not direct credentials or session material to an unrelated endpoint, and it explicitly warns against exposing session files. The confirmed concern is therefore the unsafe dependency-installation model rather than demonstrated credential exfiltration.
Attack Path
- An attacker compromises the npm publisher account, package distribution process, or another relevant supply-chain component.
- The attacker publishes a malicious release under the existing
tg-mtproto-clipackage name. - A user follows the Skill instruction `npm insta ...[truncated 1414 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
tg-mtproto-clito an exact reviewed version rather than installing the mutable latest release. - Enforce package integrity using a lockfile and registry integrity digest. Record the reviewed package version and checksum in the Skill documentation.
- Prefer a project-local installation or an isolated execution environment over
npm install -g. - Disable npm lifecycle scripts during installation where compatible, and separately review any scripts required by the package.
- Verify that the published npm tarball corresponds to the referenced source revision through reproducible builds, signed releases, provenance attestations, or documented checksum verification.
- Review updates before changing the pinned version, focusing on keychain access, session-file handling, filesystem operations, and network destinations.
- Restrict outbound traffic to documented Telegram infrastructure where operationally feasible, and monitor for connections to unrelated destinations.
- Run the CLI as an unprivileged user and limit filesystem and keychain access to the resources required for its declared Telegram functionality.
- Pin
