T08 · Insecure Dependencies
Warning
- Location
- mcp.json:4
- Finding
- Unpinned npm Package Execution Through npx## Vulnerability Details **File Location**: `mcp.json:4-5`; also documented in `SKILL.md:47-48` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code `mcp.json:4-5`: ```json "command": "npx", "args": ["clawaimail-mcp"], ``` `SKILL.md:47-48`: ```json "command": "npx", "args": ["clawaimail-mcp"], ``` ### Technical Analysis The recommended MCP configuration executes `clawaimail-mcp` through `npx` without specifying an exact version. If the package is not already available locally, `npx` can resolve and download the current package release from the npm registry at execution time. Consequently, the code executed by this configuration may differ from the version that was statically audited. The included `package-lock.json` does not constrain the version independently resolved by this `npx` command. This creates a supply-chain exposure if the npm publisher account, package, registry resolution process, or a future package release is compromised. The repository also contains inconsistent project versions: `package.json` and `server.json` identify version `0.1.1`, `package-lock.json` identifies the root package as `0.1.0`, and `SKILL.md` identifies version `0.2.0`. This inconsistency makes it harder for users to establish which source revision corresponds to the downloaded artifact. ### Attack Path 1. An attacker compromises the npm publisher account or package release process for `clawaimail-mcp`. 2. The attacker publishes a modified release containing malicious startup code. 3. A user starts the MCP server using the documented unversioned `npx clawaimail-mcp` configuration. 4. `npx` resolves and downloads the attacker-controlled release. 5. The malicious package executes with the operating-system permissions and environment inherited from the MCP host. 6. The process may access the configured `CLAWAIMAIL_API_KEY` and any other resources available to the host ...[truncated 573 chars]
- Remediation
- ## Remediation Suggestions - Pin the executable to an exact reviewed version, for example: ```json "command": "npx", "args": ["--yes", "clawaimail-mcp@0.1.1"] ``` - Prefer installing dependencies through a reviewed lockfile with `npm ci`, then execute the locally installed binary rather than resolving it dynamically on every launch. - Verify package integrity and provenance during release and installation. - Keep the versions in `package.json`, `package-lock.json`, `server.json`, and `SKILL.md` synchronized. - Use automated dependency and publisher-account monitoring, protected npm publication credentials, and provenance-enabled releases. - Review dependency updates before changing the pinned version.
