T08 · Insecure Dependencies
Error
- Location
- SKILL.md:24
- Finding
- Unpinned Third-Party Package Is Downloaded and Executed with Sensitive Account Access<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 24-46 **Vulnerability Type**: Unpinned and automatically executed third-party dependency **Risk Level**: High ### Vulnerable Code ```json "command": "npx", "args": ["-y", "ofw-mcp"] ``` ```bash npm install -g ofw-mcp ``` ```bash git clone https://github.com/chrischall/ofw-mcp cd ofw-mcp npm install && npm run build ``` ### Technical Analysis The recommended `npx -y ofw-mcp` command automatically downloads and executes the package version currently resolved by the npm registry. No exact version, integrity hash, signature, lockfile, or manual review step is required. The `-y` option suppresses the normal installation confirmation. The alternative global installation is also unpinned. The source-based procedure clones the repository's current default branch and installs its dependency graph without requiring a reviewed commit or demonstrating lockfile-integrity enforcement. This is particularly sensitive because the resulting MCP server receives `OFW_USERNAME` and `OFW_PASSWORD` and is intended to access private co-parenting messages, contact details, calendar events, expenses, journal entries, and attachments. It can also perform consequential write operations, including sending messages and deleting records. ### Attack Path 1. An attacker compromises the `ofw-mcp` npm package, its publisher account, the upstream repository, or a transitive dependency. 2. The attacker publishes or introduces a malicious version while retaining the expected package name and interface. 3. A user follows the documented `npx -y ofw-mcp`, global installation, or source-build procedure. 4. The unreviewed code executes locally with the user's operating-system privileges and receives the OFW credentials through environment variables. 5. The malicious component captures credentials, reads private OFW records, performs unauthorized account operations, or accesses other data available to the local process. ### ...[truncated 702 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `ofw-mcp` to a specific, reviewed version rather than resolving the latest release: ```json "command": "npx", "args": ["--yes", "ofw-mcp@<reviewed-version>"] ``` 2. Prefer a preinstalled, reviewed binary over downloading code every time the Skill runs. 3. Record and verify package integrity hashes or signatures before execution. 4. For source installation, check out a reviewed commit hash rather than the mutable default branch. 5. Enforce a committed lockfile and use a reproducible installation command such as `npm ci`. 6. Audit package lifecycle scripts and the complete transitive dependency tree before granting credentials. 7. Run the MCP server under a restricted operating-system account or sandbox with only the filesystem and network access required for OFW. 8. Document an update process requiring review before changing the pinned version or commit. ]]>
