T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned Third-Party npm Package Is Downloaded and Executed Automatically
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 14–15
Vulnerability Type: Unpinned third-party dependency and automatic package execution
Risk Level: Mediumyaml command: npx args: ["-y", "@guava-tech/doc-mcp"]Technical Analysis
The skill invokes
npx -ywith@guava-tech/doc-mcpbut does not specify an exact package version or integrity digest. Consequently, the package resolved and executed in the future can differ from the package available when the skill was reviewed.The
-yoption suppresses installation confirmation, allowing npm to retrieve and execute the package automatically. Because the package implementation is not included in the audited project, its executable behavior cannot be verified from the reviewed artifact. This creates a supply-chain trust boundary in which changes to the npm package, its publisher account, or its distribution channel can alter the effective code executed by the skill.No evidence in the reviewed file demonstrates that the package is currently malicious. The issue is the unsafe dependency-resolution and execution mechanism.
Attack Path
- An attacker compromises the npm publisher account, package publication workflow, or another component of the package supply chain.
- The attacker publishes a malicious release under
@guava-tech/doc-mcp. - A user or agent starts the skill after that release becomes the version resolved by npm.
npx -ydownloads the unpinned package without requesting confirmation.- The downloaded package executes with the permissions and environment available to the agent process.
- Malicious package code can access resources permitted to that process and perform unauthorized local or network operations.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the operating-system privileges of the agent user. Depending on the runtime environment and its restrictions, this ...[truncated 434 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a specific reviewed version, for example:
yaml command: npx args: ["-y", "@guava-tech/doc-mcp@x.y.z"] - Verify that the pinned npm artifact corresponds to a reviewed source revision.
- Use a lockfile and npm integrity metadata where the skill execution framework supports them.
- Consider installing dependencies during a controlled build or deployment phase rather than downloading them dynamically at runtime.
- Avoid automatic confirmation through
-yin production workflows when interactive or policy-based package approval is feasible. - Monitor the dependency for ownership changes, unexpected releases, advisories, and compromised publication credentials.
- Run the MCP server with least privilege, restricting filesystem access, environment variables, credentials, and outbound network destinations to those required for its documented function.
- Pin the dependency to a specific reviewed version, for example:
