T08 · Insecure Dependencies
- Location
README.md:26- Finding
Unpinned Third-Party MCP Package Is Automatically Executed with an API Credential
- Content
View full analysis
Vulnerability Details
File Location:
README.md:26-35;docs/install.md:10;docs/install.md:19-36
Vulnerability Type: Unpinned dependency execution with credential exposure
Risk Level: HighVulnerable Code
README.md:26-35:text Add the following to your MCP configuration file (e.g., `claude_desktop_config.json` or your Cursor MCP settings). Note that `npx` will automatically install the server on its first run: ```json { "mcpServers": { "emergence": { "command": "npx", "args": ["-y", "@emergencescience/mcp-server", "run"], "env": { "EMERGENCE_API_KEY": "sk_YOUR_KEY_HERE"docs/install.md:10:bash npx clawhub install emergencedocs/install.md:19-36:bash npm i @emergencescience/mcp-serverjson { "mcpServers": { "emergence": { "command": "npx", "args": [ "-y", "@emergencescience/mcp-server", "run" ], "env": { "EMERGENCE_API_KEY": "your_api_key_here" } } } }Technical Analysis
The installation and launch instructions do not pin
@emergencescience/mcp-serverorclawhubto an exact audited version and do not specify an integrity hash or lockfile. Thenpx -yconfiguration permits npm to download and execute a registry-provided package automatically without an interactive approval step.The downloaded MCP process is also explicitly given
EMERGENCE_API_KEYthrough its environment. The audited project does not contain the MCP server source code, a package lockfile, or an integrity record, so the effective code receiving this credential cannot be verified from the project artifact. A future package update or a compromise of the package publisher or registry distribution chain could therefore change executable behavior after this Sk ...[truncated 2039 chars]- Remediation
View remediation
Remediation Suggestions
- Pin every npm dependency and
npxinvocation to a specific audited version, such as@emergencescience/mcp-server@X.Y.Z. - Commit and enforce a package lockfile with integrity hashes. Use
npm cirather than unconstrained installation for repeatable deployments. - Avoid
npx -yfor security-sensitive services. Install the verified dependency explicitly and launch the local, locked executable. - Publish the MCP server source or a reproducible-build record so users can verify the package corresponding to the reviewed version.
- Verify package provenance and signatures in CI, and reject releases whose integrity or publisher identity does not match an approved policy.
- Use a narrowly scoped, revocable API token. Separate read-only account access from credit-spending and private-solution access.
- Run the MCP server in a sandbox with minimal filesystem access, restricted network destinations, no unnecessary environment variables, and a dedicated operating-system identity.
- Prefer a secret broker or protected credential file over embedding the key directly in general-purpose MCP configuration. Ensure configuration files have restrictive permissions.
- Require explicit user confirmation for credit-spending operations and enforce configurable transaction limits.
- Rotate the API key immediately if package compromise or unauthorized account activity is suspected.
- Pin every npm dependency and
