T08 · Insecure Dependencies
Warning
- Location
README.md:25- Finding
Unpinned Global Installation of a Third-Party CLI Package
- Content
View full analysis
Vulnerability Details
File Location:
README.md, lines 25-29
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code:
markdown ## Install the CLI ```bash npm install -g @botauth/clitext ### Technical Analysis The documentation instructs users to install the latest available version of `@botauth/cli` globally from the npm registry. It does not pin an exact reviewed version, verify package integrity or provenance, or provide a lockfile. Consequently, the code installed and executed can differ from the version assessed when the Skill was published. If the package, publisher account, or distribution channel is compromised, a malicious release could execute npm lifecycle scripts during installation and install an attacker-controlled `botauth` executable on the user's global `PATH`. This risk is especially significant because the Skill subsequently directs the agent to use this CLI to retrieve API keys, tokens, passwords, and other sensitive fields from an unlocked vault. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or another part of its release pipeline. 2. The attacker publishes a malicious version under the legitimate `@botauth/cli` package name. 3. A user follows the README and runs `npm install -g @botauth/cli`. 4. npm selects the malicious latest version because no exact version or integrity value is specified. 5. Malicious lifecycle code executes with the privileges of the user running npm, or a malicious `botauth` executable is placed on the global `PATH`. 6. The agent later invokes commands such as `botauth get --id <id> --fields api_key`. 7. The compromised CLI can capture retrieved credentials, alter command output, access files available to the user, or transmit sensitive data to an attacker-controlled service. ### Impact Assessment Successful exploitation can provide code execu ...[truncated 522 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to an exact, reviewed version, for example:
bash npm install -g @botauth/cli@0.1.0 - Document how users can verify package ownership, release provenance, signatures, and published integrity hashes before installation.
- Prefer a project-local installation with a committed lockfile over a global installation where operationally possible.
- Avoid running npm with administrator or root privileges.
- Review the selected package version and its lifecycle scripts before recommending it.
- Consider disabling lifecycle scripts during installation when compatible with the package:
bash npm install --ignore-scripts @botauth/cli@<reviewed-version> - Ensure the expected executable path and package integrity are verified before allowing the CLI to handle vault credentials.
- Establish an update process in which each new version is reviewed and explicitly pinned rather than automatically consuming the latest registry release.
- Pin the CLI to an exact, reviewed version, for example:
