T08 · Insecure Dependencies
- Location
scripts/imiva_mcp.py:14- Finding
Automatic Execution of an Unpinned npm Package
- Content
View full analysis
Vulnerability Details
File Location:
scripts/imiva_mcp.py:14,scripts/imiva_mcp.py:54-62; also documented inSKILL.md:46,86-94andreferences/mcp-config.example.json:4-9
Vulnerability Type: T08: Insecure Dependencies
Risk Level: HighVulnerable Code
python PACKAGE = "@infimind/ecom-content-cli@latest"python proc = subprocess.Popen( [npx, "-y", PACKAGE], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1, env=env, )The example configuration contains the same mutable dependency:
json { "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ] }Technical Analysis
The helper launches
@infimind/ecom-content-cli@latestthroughnpx -y. Thelatesttag is mutable and can resolve to a different package version each time the helper is executed. The-yoption suppresses the installation confirmation, allowing the resolved package to be downloaded and executed automatically.Consequently, the effective executable payload is not fixed to the code reviewed in this audit. A compromised npm publisher account, malicious package update, registry compromise, or upstream supply-chain incident could cause arbitrary code to run during an otherwise legitimate Skill invocation.
Attack Path
- An attacker compromises the npm package publisher, publication pipeline, or another relevant part of the package supply chain.
- The attacker publishes a malicious release and assigns it the
latestdistribution tag. - A user follows the documented configuration or runs
scripts/imiva_mcp.py. npx -yresolves, downloads, and starts the malicious release without an interactive confirmation.- The malicious package executes with the operating-system privileges and environment of the invoking user.
- It may access available files, the MCP token, ...[truncated 700 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an exact, reviewed package version, such as@infimind/ecom-content-cli@1.2.3. - Use a lockfile and verify package integrity with a trusted registry checksum.
- Prefer installing dependencies during a controlled build or setup phase rather than downloading executable code at runtime.
- Remove
-ywhere practical so unexpected installation changes require explicit approval. - Review package updates before changing the pinned version.
- Run the MCP package in a sandbox with restricted filesystem, environment, and network access.
- Apply the same version pinning to
SKILL.md,references/mcp-config.example.json, and the Python helper so all supported invocation paths remain consistent.
- Replace
