T08 · Insecure Dependencies
- Location
mcp.json:4- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
mcp.json:4-5; also documented inSKILL.md:47-48
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumVulnerable 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-mcpthroughnpxwithout specifying an exact version. If the package is not already available locally,npxcan 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.jsondoes not constrain the version independently resolved by thisnpxcommand. 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.jsonandserver.jsonidentify version0.1.1,package-lock.jsonidentifies the root package as0.1.0, andSKILL.mdidentifies version0.2.0. This inconsistency makes it harder for users to establish which source revision corresponds to the downloaded artifact.Attack Path
- An attacker compromises the npm publisher account or package release process for
clawaimail-mcp. - The attacker publishes a modified release containing malicious startup code.
- A user starts the MCP server using the documented unversioned
npx clawaimail-mcpconfiguration. npxresolves and downloads the attacker-controlled release.- The malicious package executes with the operating-system permissions and environment inherited from the MCP host.
- The process may access the configured
CLAWAIMAIL_API_KEYand any other resources available to the host ...[truncated 573 chars]
- An attacker compromises the npm publisher account or package release process for
- Remediation
View 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, andSKILL.mdsynchronized. -
Use automated dependency and publisher-account monitoring, protected npm publication credentials, and provenance-enabled releases.
-
Review dependency updates before changing the pinned version.
-
