T08 · Insecure Dependencies
- Location
SKILL.md:35- Finding
Automatic Execution of an Unverified Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:35-40
Vulnerability Type: Supply-chain risk from automatic third-party package retrieval and execution
Risk Level: Mediumbash mcporter call --stdio "npx -y xmind-generator-mcp@0.1.2" generate-mind-map --args '{...}'Read XMind (Markdown export)
bash mcporter call --stdio "npx -y xmind-generator-mcp@0.1.2" read-mind-map --args '{"inputPath":"/path/to/file.xmind","style":"A"}'Technical Analysis
The skill directs the Agent to invoke
npx -y, which can download and execute thexmind-generator-mcpnpm package automatically without interactive approval. Pinning the dependency to version0.1.2reduces exposure to later package updates, but it does not cryptographically verify the retrieved artifact or establish that the package implementation and its transitive dependencies are trusted.The executed MCP server runs as a local process with the permissions and environment inherited from the Agent. It receives user-controlled mind-map content, local input paths, and output paths. Consequently, compromise of the named npm release, its transitive dependencies, the registry delivery path, or the local npm cache could turn an apparently legitimate generation or reading operation into arbitrary local code execution.
The project contains no embedded implementation of this package, reviewed lockfile, integrity hash, sandbox policy, filesystem allowlist, environment-variable filtering, or network restriction that would constrain the dependency after execution.
Attack Path
- An attacker compromises the published
xmind-generator-mcp@0.1.2artifact, one of its transitive dependencies, the package delivery path, or a package source/cache trusted bynpx. - A user asks the Agent to generate or read an XMind file.
- Following
SKILL.md, the Agent executesnpx -y xmind-generator-mcp@0.1.2throughmcporter. npxretrieves or resolves ...[truncated 1243 chars]
- An attacker compromises the published
- Remediation
View remediation
Remediation Suggestions
- Vendor or locally install a reviewed copy of the MCP server instead of downloading it during each skill invocation.
- Maintain the dependency and all transitive dependencies in a committed lockfile with npm integrity hashes.
- Verify the package tarball against an independently recorded cryptographic digest before installation or execution.
- Disable package lifecycle scripts during installation unless they have been specifically reviewed and are required.
- Run the MCP server in a dedicated sandbox or container with:
- A read-only root filesystem.
- Explicitly mounted input and output directories only.
- No access to unrelated home-directory content.
- A minimal, filtered environment without credentials or tokens.
- Network access disabled by default or restricted to an explicit allowlist.
- A non-privileged user and resource limits.
- Validate and canonicalize all input and output paths before passing them to the MCP server, enforcing an approved directory allowlist.
- Perform source and dependency review of
xmind-generator-mcp@0.1.2before approving it for use, and continuously monitor the package for ownership changes, advisories, and integrity changes. - Replace the
npx -yruntime command with a reviewed, locally pinned executable so package resolution cannot silently introduce different code.
