T03 · Remote Payload Retrieval and Execution
- Location
scripts/imiva_mcp.py:14- Finding
Runtime Execution of an Unpinned Remote 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, ) ``` From `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 Skill invokes `npx` with both the automatic-confirmation option (`-y`) and the mutable package selector `@latest`. Consequently, the executable code is resolved from the npm registry at runtime rather than being fixed to the version reviewed during this audit. The contents of the package can change whenever a new release receives the `latest` distribution tag. A compromised package publisher, npm account, package release process, or registry response could therefore cause future Skill invocations to execute code materially different from the audited code. This issue is primarily remote payload retrieval and execution because the effective executable payload is downloaded dynamically and can change after review. It also repre ...[truncated 1765 chars]- Remediation
View remediation
