T08 · Insecure Dependencies
- Location
references/capabilities.md:29- Finding
Unpinned Third-Party Package Is Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
references/capabilities.md, lines 29–33
Vulnerability Type: Unpinned and mutable third-party dependency execution
Risk Level: MediumVulnerable Code
markdown ## Dependency - MCP server name: `aigroup-mdtoword-mcp` - Local launch pattern in this workspace: `npx -y aigroup-mdtoword-mcp` - Upstream package metadata includes both `stdio` and `http` transportsTechnical Analysis
The documented launch pattern invokes
npx -y aigroup-mdtoword-mcpwithout an exact package version, lockfile, or integrity constraint. When the package is not already available in a trusted local cache,npxcan resolve and download it from the configured package registry before executing it. The-yoption suppresses the installation confirmation.Because package resolution is mutable, the code executed at runtime may differ from the code originally reviewed. A compromised publisher account, malicious future release, registry compromise, or unsafe registry configuration could therefore introduce attacker-controlled code. The project does not include the MCP server implementation, so its runtime behavior cannot be independently verified from the audited artifact.
Attack Path
- An attacker compromises the package publisher, registry, or dependency-resolution environment, or publishes a malicious update under the dependency's package identity.
- A user asks the agent to convert Markdown or structured table data into a Word document.
- The skill routes the request to
aigroup-mdtoword-mcp. - The workspace launches the documented
npx -y aigroup-mdtoword-mcpcommand. npxresolves and downloads the current mutable package version without interactive approval.- The malicious package executes locally with the privileges and environmental access of the agent process.
- The package can access resources available to that process, potentially including submitted Markdown, referenced local images, generate ...[truncated 835 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an audited exact version, for example:
bash npx --yes aigroup-mdtoword-mcp@<audited-exact-version> - Maintain a lockfile containing registry-resolved integrity metadata and enforce immutable or frozen installation behavior in deployment.
- Prefer preinstalling the reviewed package from a trusted registry or internal artifact repository rather than downloading code at invocation time.
- Verify package provenance, signatures, checksums, ownership history, and release contents before upgrades.
- Apply an explicit dependency-update review process so newer releases cannot enter production automatically.
- Where compatible with the package, disable installation lifecycle scripts or review them before execution.
- Run the MCP server in a sandbox or container with:
- A dedicated, unprivileged operating-system identity
- Read/write access only to required input and output paths
- No access to unrelated credentials or environment variables
- Restricted outbound network access
- Resource and execution-time limits
- Document the exact approved transport and bind any HTTP transport only to a trusted local interface with authentication where applicable.
- Pin the dependency to an audited exact version, for example:
