T08 · Insecure Dependencies
- Location
- SKILL.md:46
- Finding
- Unpinned Package Retrieval and Execution## Vulnerability Details **File Location**: `SKILL.md:46-58` **Vulnerability Type**: Unpinned third-party package installation and dynamic execution **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g @xmtp/cli # or pnpm add -g @xmtp/cli # or yarn global add @xmtp/cli ``` ```bash npx @xmtp/cli <command> <arguments> # or pnpx / yarn dlx ``` ### Technical Analysis The installation and execution instructions do not specify an exact package version or an integrity constraint. Consequently, the package manager resolves whichever release is current at execution time. The `npx`, `pnpx`, and `yarn dlx` variants are particularly sensitive because they may download and immediately execute package code. The package name is consistent with the Skill's declared XMTP purpose, and the audited files contain no evidence that the referenced package is currently malicious. Nevertheless, the absence of version pinning makes execution non-reproducible and exposes users to upstream package compromise, malicious release publication, registry compromise, or unexpected behavior introduced by a newer release. ### Attack Path 1. An attacker compromises the upstream package publisher account, package distribution infrastructure, or a future package release. 2. The attacker publishes code under the package version selected by the package manager. 3. A user or Agent follows the Skill and runs an unpinned installation or `npx` command. 4. The package manager downloads the uncontrolled release. 5. The package executes with the operating-system privileges and environment access of the invoking process. ### Impact Assessment A compromised dependency could execute arbitrary local code with the invoking user's privileges. Potential scope includes access to files available to that user, environment variables, XMTP configuration, wallet credentials, database keys, and messaging data. If installation is performed ...[truncated 113 chars]
- Remediation
- ## Remediation Suggestions - Pin the dependency to an exact, reviewed version, such as `@xmtp/cli@X.Y.Z`. - Record and verify package integrity metadata before use. - Document the expected package registry and reject unexpected registry overrides. - Avoid dynamic `npx`, `pnpx`, or `yarn dlx` retrieval in automated or privileged workflows. - Install the reviewed package through a lockfile-controlled project dependency where possible. - Establish a dependency update process that reviews release notes, package provenance, and integrity before changing the pinned version. - Run the CLI under a least-privileged account with access limited to the files and secrets required for the task.
