T03 · Remote Payload Retrieval and Execution
- Location
scripts/imiva_mcp.py:14- Finding
Unpinned npm Package Is Downloaded and Executed Automatically
- 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 configuration example also recommends the same mutable dependency: ```json { "mcpServers": { "imiva-ecommerce": { "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ] } } } ``` ### Technical Analysis The helper invokes `npx` with `-y` and the mutable package selector `@latest`. As a result, the executable code used at runtime is not fixed by the audited project. A later package release can differ completely from the version available during review. The `-y` option automatically accepts package installation without an interactive confirmation. This turns Skill invocation into a remote code retrieval and execution channel. Although the package appears to be the declared IMIVA integration rather than an evident typosquat, its mutable version creates a supply-chain trust boundary that is not controlled by this repository. The downloaded package executes with the operating-system privileges of the user running the Agent. The project provides no integrity verification, package lock, sandbox, or reviewed version constraint. ### Attack Path 1. An ...[truncated 1368 chars]- Remediation
View remediation
