T08 · Insecure Dependencies
Error
- Location
- SKILL.md:12
- Finding
- Unpinned Third-Party Package Is Downloaded and Executed Through npx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 12–14 **Vulnerability Type**: Unpinned and unverified third-party dependency execution **Risk Level**: High ### Vulnerable Code ```bash claude mcp add xbird -- npx @checkra1n/xbird ``` ### Technical Analysis The setup command instructs users to execute `@checkra1n/xbird` through `npx` without specifying a package version or integrity hash. Depending on the local npm cache and `npx` behavior, the command can retrieve and execute the package version currently published in the npm registry. Consequently, the code executed during installation is not immutable and may differ from the version originally reviewed. The project provides no lockfile, package checksum, vendored source, source-code verification procedure, or publisher-authenticity validation. The package scope also does not establish an official relationship with X. This is a supply-chain weakness rather than evidence that the current package is malicious. However, compromise of the npm publisher, package, registry resolution process, or a future release could place attacker-controlled code directly inside the MCP process. ### Attack Path 1. An attacker compromises the npm publisher account, publishing pipeline, or package distribution channel for `@checkra1n/xbird`. 2. The attacker publishes a modified release containing malicious installation or runtime code. 3. A user follows the documented setup command without a pinned version. 4. `npx` downloads and executes the attacker-controlled release under the user's local account. 5. The package inherits access available to the MCP process, potentially including X session credentials, wallet credentials, files readable by the user, and network access. 6. The malicious package can export credentials, perform unauthorized X operations, initiate unauthorized payment activity, or execute additional commands with the user's privileges. ### Impact Assessment Successful exploitation prov ...[truncated 725 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a specific, audited version rather than allowing `npx` to resolve the latest release: ```bash claude mcp add xbird -- npx @checkra1n/xbird@<audited-version> ``` 2. Verify the pinned package using an integrity hash and a committed lockfile. 3. Publish or link to reproducible source code and document how the distributed npm artifact corresponds to that source. 4. Verify the package publisher and signing provenance before installation. 5. Disable lifecycle scripts where practical and review all installation and runtime scripts before execution. 6. Run the MCP server in a sandbox or isolated operating-system account with restricted filesystem and network access. 7. Establish a controlled update process in which new versions are reviewed before deployment rather than automatically consumed. 8. Restrict the MCP process to only the credentials and filesystem resources necessary for its operation. ]]>
