T08 · Insecure Dependencies
- Location
SKILL.md:90- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 90
Vulnerability Type: Insecure third-party dependency installation
Risk Level: MediumVulnerable Code Snippet:
bash npm install -g secure-proxy@latestTechnical Analysis
The skill instructs the agent or user to install the mutable
latestrelease of the externalsecure-proxynpm package globally. Becauselatestis an npm distribution tag rather than an immutable version, the code installed in the future may differ from the code assessed when this skill was reviewed.npm installation can execute package lifecycle scripts, including
preinstall,install, andpostinstall. A malicious package release, compromised publisher account, or compromised upstream distribution channel could therefore execute arbitrary commands during installation. Global installation also makes the resulting commands available system-wide for the current environment and increases the package's influence over later command invocations.The dependency's source code and package metadata are not included in this project, so its behavior and the documentation's security claims cannot be independently verified from the audited artifact.
Attack Path
- An attacker compromises the npm package publisher account or upstream release process for
secure-proxy. - The attacker publishes a malicious release and assigns it to the
latestdistribution tag. - An agent or user follows the instruction in
SKILL.mdand runsnpm install -g secure-proxy@latest. - npm resolves the mutable tag to the malicious release.
- Malicious package lifecycle scripts execute during installation with the invoking user's privileges.
- The globally installed
secure-curlor related commands may subsequently execute attacker-controlled logic while appearing to be legitimate tools.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the ...[truncated 753 chars]
- An attacker compromises the npm package publisher account or upstream release process for
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an exact, reviewed package version, for examplesecure-proxy@X.Y.Z. - Pin and verify the package integrity using a lockfile and registry-provided integrity hashes.
- Prefer a project-local installation over
npm install -gso the dependency is isolated and reproducible. - Review the package contents and lifecycle scripts before installation, including the resolved tarball and its cryptographic digest.
- Disable lifecycle scripts with
--ignore-scriptswhen they are not required. If they are required, document and audit each script before execution. - Use a trusted registry and consider allowlisting the exact package name, version, publisher, and integrity value.
- Run installation and the CLI under a least-privileged account or isolated environment without unnecessary credentials.
- Document a verified upgrade process instead of allowing automatic resolution to future releases.
- Replace
