T03 · Remote Payload Retrieval and Execution
- Location
scripts/imiva_mcp.py:14- Finding
Runtime Retrieval and Execution of an Unpinned npm Package
- 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 mutable dependency is recommended by the example 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 invokes `npx -y @infimind/ecom-content-cli@latest`. This retrieves and executes the package version currently associated with the mutable npm `latest` tag. Consequently, the code executed in a future invocation is not necessarily the code that existed when this Skill was audited. The `-y` option automatically accepts package installation, eliminating an interactive review opportunity. There is no exact version pin, lockfile, package integrity hash, vendored dependency, or verification step. This creates both a remote payload mutability risk and a software supply-chain weakness. The issue does not establish that the current package is malicious. The vulnerability is that a compromi ...[truncated 1538 chars]- Remediation
View remediation
