T03 · Remote Payload Retrieval and Execution
- Location
scripts/imiva_mcp.py:14- Finding
Mutable npm Package Is Downloaded and Executed Without Integrity Verification
- Content
View full analysis
dict: npx, token = require_runtime() env = os.environ.copy() env["MCP_TOKEN"] = token env["API_URL"] = os.environ.get( "IMIVA_API_URL", os.environ.get("API_URL", DEFAULT_API_URL), ) proc = subprocess.Popen( [npx, "-y", PACKAGE], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1, env=env, ) ``` The same unsafe dependency selection is presented in the example MCP configuration: ```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 launches `npx` with `-y` and the mutable package selector `@infimind/ecom-content-cli@latest`. The `-y` option suppresses interactive confirmation, while the `latest` distribution tag resolves at runtime and can point to a different package release after this Skill has been reviewed. Consequently, the repository does not fully define the code that will execute. There is no exact version pin, committed lockfile, package-integrity value, checksum verification, or local reviewed installation. This creates both a remote payload retrieval channel and a dependency supply-chain risk. The child process receives a copy of the parent environment together with `MCP_TOKEN` and `API_URL`. A ...[truncated 1774 chars]- Remediation
View remediation
