T03 · Remote Payload Retrieval and Execution
- 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,54-61;references/mcp-config.example.json:4-8;SKILL.md:88-92
Vulnerability Type: Mutable remote dependency retrieval and execution
Risk Level: HighVulnerable Code
scripts/imiva_mcp.py:14:python PACKAGE = "@infimind/ecom-content-cli@latest"scripts/imiva_mcp.py:54-61: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:4-8:json "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ],SKILL.md:88-92:json "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ],Technical Analysis
The helper invokes
npxwith both-yand the mutable@latestpackage tag. This causes npm to retrieve and execute whichever package release is designated as latest at invocation time, without interactive confirmation.The effective executable payload can therefore change after this Skill has been reviewed. The repository does not pin an audited package version, provide a lockfile for the executed package, or verify the downloaded artifact against an expected integrity hash. Consequently, the audit of the local files cannot establish what third-party code future executions will run.
This is both an insecure dependency-management practice and a remote payload execution channel. Exploitation would require compromise or malicious modification of the npm package, its publisher account, or the relevant package-distribution path; no evidence was found that the package is currently malicious.
Attack Path
- An attacker compromises the npm publisher account, package, or release process for
@infimind/ecom-content-cli. - The attacker publishes a malicious ...[truncated 1117 chars]
- An attacker compromises the npm publisher account, package, or release process for
- Remediation
View remediation
Remediation Suggestions
-
Replace
@latestwith an exact, reviewed version, for example:python PACKAGE = "@infimind/ecom-content-cli@1.2.3" -
Remove automatic ad hoc package retrieval from normal Skill execution. Install the dependency during a controlled deployment or setup phase and invoke the installed executable directly.
-
Commit and enforce an npm lockfile containing package integrity metadata.
-
Verify the package artifact against an expected registry integrity hash or independently maintained checksum before execution.
-
Review package updates before changing the pinned version. Use automated dependency scanning and provenance verification where supported.
-
Apply the same exact version in
scripts/imiva_mcp.py,SKILL.md, andreferences/mcp-config.example.jsonso users are not directed back to the mutable tag. -
Run the MCP package in a restricted container or sandbox with minimal filesystem and network access.
-
