T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:14- Finding
Unpinned npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
scripts/imiva_mcp.py:14-57;SKILL.md:93-104;references/mcp-config.example.json:4-8
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: HighVulnerable Code
scripts/imiva_mcp.py:python PACKAGE = "@infimind/ecom-content-cli@latest" DEFAULT_API_URL = "https://imiva.ecpro.com"python proc = subprocess.Popen( [npx, "-y", PACKAGE], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1, env=env, )references/mcp-config.example.json:json { "mcpServers": { "imiva-ecommerce": { "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ], "env": { "MCP_TOKEN": "your-token-here", "API_URL": "https://imiva.ecpro.com" } } } }Technical Analysis
The helper invokes
npxwith the-yoption and an npm package identified by the mutablelatesttag. This causes the current registry release to be retrieved and executed automatically without an interactive confirmation step.The effective code executed by the Skill can therefore change after the Skill itself has been reviewed. No exact version, package integrity digest, lockfile, or verified local artifact constrains the downloaded dependency. A compromised publisher account, malicious package release, registry compromise, or unsafe future update could introduce arbitrary code that executes with the privileges of the user running the helper.
The child process also receives an environment containing
MCP_TOKEN, increasing the sensitivity of this supply-chain boundary.Attack Path
- An attacker compromises the npm package publisher, release pipeline, registry entry, or another mechanism controlling the
latestrelease. - The attacker publishes a modified releas ...[truncated 1242 chars]
- An attacker compromises the npm package publisher, release pipeline, registry entry, or another mechanism controlling the
- Remediation
View remediation
Remediation Suggestions
- Replace the mutable
latesttag with an exact, reviewed package version, for example:python PACKAGE = "@infimind/ecom-content-cli@1.2.3" - Pin and verify the package's integrity digest through a lockfile or an equivalent trusted dependency-verification mechanism.
- Install dependencies during a controlled deployment step instead of downloading executable code during each invocation.
- Consider vendoring or preinstalling an audited package artifact and invoking it from a verified local path.
- Document the expected npm registry, package publisher, package version, and integrity value.
- Review dependency changes before upgrades and use automated supply-chain scanning.
- Construct a minimal child-process environment rather than forwarding the complete parent environment.
- Update
SKILL.mdandreferences/mcp-config.example.jsonso all documented commands use the same pinned and verified release.
- Replace the mutable
