T08 · Insecure Dependencies
- Location
- SKILL.md:41
- Finding
- Unpinned Third-Party Packages Are Downloaded and Executed## Vulnerability Details **File Location**: `SKILL.md:41-44` and `SKILL.md:111-112` **Vulnerability Type**: Insecure dependency installation and execution **Risk Level**: High ### Vulnerable Code `SKILL.md:41-44`: ```yaml agentmail: command: "npx" args: ["-y", "agentmail-mcp"] env: ``` `SKILL.md:111-112`: ```text - The `mcp` Python package must be installed: `pip install mcp` - Real-time inbound email (webhooks) requires a public server — use `list_threads` polling via cronjob instead for personal use ``` ### Technical Analysis The MCP configuration invokes `npx -y agentmail-mcp` without specifying a reviewed package version or verifying an integrity digest. If the package is not already available locally, `npx` can retrieve it from the configured npm registry. The `-y` option suppresses the interactive installation prompt, allowing the retrieved package to execute automatically when Hermes starts the MCP server. The documented `pip install mcp` command is similarly unpinned. Its resolved version and transitive dependency graph can change over time without any corresponding change to this audited skill. Neither installation path specifies hashes, a lockfile, or another integrity control. This does not establish that the current packages are malicious. It creates a supply-chain exposure in which a compromised maintainer account, registry, package release, or transitive dependency could cause future users to retrieve attacker-controlled code. ### Attack Path 1. An attacker compromises the relevant package publishing account, package registry entry, or a transitive dependency. 2. The attacker publishes a malicious version under the package name used by the skill. 3. A user follows the setup instructions or restarts Hermes with the documented MCP configuration. 4. `npx -y` resolves, downloads, and executes the unpinned `agentmail-mcp` package without an installation confirmation. 5. Alternatively, ...[truncated 886 chars]
- Remediation
- ## Remediation Suggestions - Pin `agentmail-mcp` to a specifically reviewed version, for example by using an exact version rather than an unconstrained package name. - Remove `-y` where feasible so unexpected installation is not silently accepted. - Install dependencies as a separate, explicit setup step and run the MCP server from a locked local installation. - Commit and enforce an npm lockfile for a wrapper project if the platform supports it. - Pin the Python `mcp` package and its transitive dependencies to reviewed versions. - Require package hashes for Python installation, such as through a hash-locked requirements file and `pip install --require-hashes`. - Verify package provenance, maintainers, signatures or attestations, and integrity digests before deployment. - Run the MCP server under a dedicated, minimally privileged account or sandbox with restricted filesystem and network access. - Establish dependency update review and vulnerability-monitoring procedures rather than automatically consuming new releases.
