T08 · Insecure Dependencies
- Location
SKILL.md:21- Finding
Unpinned Global npm Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 21-29
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: MediumVulnerable Code
bash # Install using npm npm install -g mcporter # Verify installation mcporter --versionTechnical Analysis
The mandatory setup instructions install
mcporterglobally without specifying an exact version, package integrity value, or trusted registry. Consequently, the installed code depends on whichever package release the configured npm registry serves when the command is run.npm packages may execute lifecycle scripts during installation with the privileges of the invoking user. The
-goption also installs the executable into a global command location, increasing its reach beyond this project. If the package, its publication account, one of its transitive dependencies, or the configured registry is compromised, following these instructions could install and execute attacker-controlled code.This finding does not establish that the current
mcporterpackage is malicious. The vulnerability is the absence of dependency pinning, integrity verification, and installation isolation.Attack Path
- An attacker compromises the package publisher, npm package, transitive dependency, or registry response.
- The attacker publishes or serves a malicious release under the expected package name.
- A user follows the Skill instructions and runs
npm install -g mcporter. - npm retrieves the current attacker-controlled release because no exact version or integrity constraint is specified.
- Malicious npm lifecycle code can execute with the installing user's privileges.
- The malicious package can also place or replace the globally available
mcporterexecutable. - Subsequent MCP commands may execute attacker logic while appearing to invoke the legitimate tool.
Impact Assessment
Successful exploitation c ...[truncated 544 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
mcporterto an exact reviewed version rather than installing the latest available release:bash npm install --save-exact mcporter@<reviewed-version> - Prefer a project-local dependency governed by a committed lockfile instead of a global installation.
- Use
npm ciwith a reviewedpackage-lock.jsonin automated or reproducible environments. - Document the expected npm registry and prevent fallback to untrusted registries.
- Verify package provenance and integrity before installation, including publisher identity and the lockfile integrity value.
- Disable lifecycle scripts with
--ignore-scriptswhen the reviewed package can function without them. - Run the tool as an unprivileged user and never recommend
sudo npm install -g. - Periodically review the pinned version and its transitive dependency tree before controlled upgrades.
- Pin
