T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:34
- Finding
- Unpinned Third-Party Package Download and Execution## Vulnerability Details **File Location**: `SKILL.md`, line 34 **Vulnerability Type**: Unpinned npm package execution **Risk Level**: Medium **Vulnerable Code**: ```text Desktop clients can instead run `npx -y @nexdoc/mcp-server` with `NXD_API_KEY`. ``` ### Technical Analysis The documented command uses `npx -y` to download and execute the version of `@nexdoc/mcp-server` currently resolved by the npm registry. It does not pin a reviewed package version or require verification of package integrity or provenance. Because the command executes third-party package code locally, a malicious package release, compromised maintainer account, registry compromise, or compromised transitive dependency could change the effective code after this skill has been reviewed. The `-y` option also suppresses the normal installation confirmation. The process is expected to receive `NXD_API_KEY`, so downloaded code can potentially read that credential along with other environment variables and resources accessible to the invoking user. ### Attack Path 1. An attacker compromises the npm package, its maintainer account, its publication process, or a transitive dependency. 2. The attacker publishes a malicious version that can be resolved by the unpinned package reference. 3. A user follows the skill documentation and runs `npx -y @nexdoc/mcp-server` with `NXD_API_KEY` in the process environment. 4. `npx` downloads and executes the compromised package without an interactive confirmation. 5. Malicious package code reads the inherited API key or other accessible data and may transmit it externally or execute additional commands with the invoking user's privileges. ### Impact Assessment Successful exploitation could expose `NXD_API_KEY` and any other environment variables, files, or network resources available to the invoking process. Arbitrary commands could run with the privileges of the user who launches `npx`. The precise scope depends on tha ...[truncated 142 chars]
- Remediation
- ## Remediation Suggestions - Pin the dependency to a specifically reviewed version, for example: ```text npx -y @nexdoc/mcp-server@X.Y.Z ``` - Publish and verify package provenance and integrity information for approved releases. - Establish a controlled update process that reviews each new package version and its transitive dependencies before changing the pinned version. - Where practical, install the verified package through a lockfile-based workflow rather than resolving the latest version at execution time. - Run the package in a sandbox or restricted service account with minimal filesystem and network permissions. - Provide only the required `NXD_API_KEY` to the process rather than inheriting the user's complete environment. - Disable unnecessary package lifecycle scripts where the installation workflow supports doing so. - Document API-key rotation and revocation procedures in case package or credential compromise is suspected.
