T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:18
- Finding
- Unpinned Global npm Dependency Introduces Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, lines 18–21 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```markdown 2. **Install zotero-mcp package**: ```bash npm install -g zotero-mcp ``` ``` ### Technical Analysis The installation instruction retrieves the latest available version of `zotero-mcp` from the configured npm registry and installs it globally. It does not pin an exact reviewed version or provide lockfile or integrity metadata. npm packages can execute lifecycle scripts during installation. Consequently, a compromised package release, registry account, package source, or transitive dependency could execute code with the privileges of the user running the installation. Global installation also increases the scope of the installed package and exposes a mutable executable through the user's command search path. The installed `zotero-mcp-server` executable is subsequently invoked by examples in `SKILL.md` and by `scripts/zotero-mcp-client.py`. Because the dependency source is not included in this project, its runtime behavior could not be verified during this audit. The server is also expected to interact with Zotero's local API, potentially exposing reference metadata, collections, annotations, and PDF content to a compromised dependency. ### Attack Path 1. An attacker compromises the `zotero-mcp` publisher, package release, registry delivery path, or one of its dependencies. 2. The attacker publishes malicious package code or an npm lifecycle script under a version satisfying the unpinned installation command. 3. A user follows the documented instruction: ```bash npm install -g zotero-mcp ``` 4. npm downloads the attacker-controlled release and may execute its lifecycle scripts during installation. 5. The package is installed globally as `zotero-mcp-server`. 6. The Skill later invokes that executable while Zotero's local ...[truncated 984 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to an exact, reviewed version rather than installing the latest release: ```bash npm install --save-exact zotero-mcp@<reviewed-version> ``` 2. Prefer a project-local installation over `npm install -g` to reduce system-wide exposure. 3. Commit a lockfile containing resolved versions and integrity hashes, and use `npm ci` for reproducible installation. 4. Review the package's source, publisher identity, transitive dependencies, and lifecycle scripts before approval. 5. Where compatible, install with lifecycle scripts disabled: ```bash npm ci --ignore-scripts ``` 6. Execute the MCP server under a restricted account or sandbox with access limited to the required Zotero API and files. 7. Apply outbound network restrictions if the server only needs localhost access. 8. Document the expected package checksum, source repository, publisher, and verified executable path. 9. Consider vendoring or otherwise distributing a reviewed implementation through a trusted, integrity-verified release process.
