T08 · Insecure Dependencies
- Location
SKILL.md:18- Finding
Unpinned Global Installation of a Third-Party Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 18–25
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
markdown This skill requires [cortex-engine](https://github.com/Fozikio/cortex-engine) running as an MCP server. Install it separately before using this skill: ```bash npm install -g @fozikio/cortex-engineInstall the scoped package, unpinned. The unscoped
cortex-engineon npm is the old name and is deprecated — but old versions of it still resolve, so pinning one installs an ancient engine that works just well enough to hide the problem. Always use@fozikio/cortex-engine, and let it take the latest.text ### Technical Analysis The Skill explicitly instructs users to install the latest available version of `@fozikio/cortex-engine` globally instead of pinning a reviewed version. Consequently, the software ultimately installed can change after the Skill itself has been audited. A global npm installation may execute package lifecycle scripts with the installing user's privileges and places package-provided executables into the user's global command environment. Although the package name is scoped and matches the declared upstream project, neither an exact version nor a package integrity digest is specified. The instruction to “let it take the latest” therefore creates exposure to publisher-account compromise, registry compromise, malicious release publication, or an unintentionally vulnerable future release. ### Attack Path 1. An attacker compromises the package publisher account, release pipeline, or another component capable of publishing `@fozikio/cortex-engine`. 2. The attacker publishes a malicious release under the package's latest distribution tag. 3. A user follows the Skill's documented command: `npm install -g @fozikio/cortex-engine`. 4. npm downloads the attacker-controlled release. Any malicious lifecycle scripts can execute ...[truncated 1090 chars]- Remediation
View remediation
Remediation Suggestions
-
Replace the floating installation command with an exact, reviewed version, for example:
bash npm install -g @fozikio/cortex-engine@1.4.0The selected version should be independently reviewed and updated deliberately.
-
Prefer a project-local installation governed by a committed lockfile rather than a global installation:
bash npm install --save-exact @fozikio/cortex-engine@1.4.0 -
Verify package provenance and integrity through npm provenance information, registry metadata, and lockfile integrity hashes before installation.
-
Disable lifecycle scripts during installation when they are not required:
bash npm install --ignore-scripts --save-exact @fozikio/cortex-engine@1.4.0If lifecycle scripts are required, review them before permitting execution.
-
Run the MCP server under a dedicated, least-privileged account or within an appropriately constrained container or sandbox. Restrict filesystem and network access to what the memory service actually requires.
-
Document a controlled update process that reviews release notes and package changes before changing the pinned version, rather than automatically consuming the latest release.
-
