T08 · Insecure Dependencies
- Location
skill.json:26- Finding
Unpinned npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
skill.json:26-31andREADME.md:19-20
Vulnerability Type: Unpinned third-party dependency executed throughnpx
Risk Level: HighAffected configuration in
skill.json:json "mcp": { "command": "npx", "args": [ "-y", "@agentdocs1/mcp-server", "--http" ],Documented installation configuration in
README.md:json "command": "npx", "args": ["-y", "@agentdocs1/mcp-server", "--http"],Technical Analysis
The Skill executes
@agentdocs1/mcp-serverthroughnpx -ywithout specifying an exact package version or integrity hash. If the package is not already available locally,npxcan retrieve it from the configured npm registry. The-yoption suppresses interactive confirmation.As a result, the code actually executed can change after this Skill has been reviewed. A compromised maintainer account, malicious package release, registry compromise, or unexpected upstream update could cause arbitrary code to run under the privileges of the process hosting the Skill.
The package is also supplied with the configured UPLO service URL and API token through environment variables. Therefore, compromise of the dependency could provide immediate access to credentials and organizational food-safety records.
Attack Path
- An attacker compromises the npm package, its publisher account, or the dependency publication process.
- The attacker publishes a malicious version under the existing
@agentdocs1/mcp-serverpackage name. - A user installs or launches the Skill.
npx -y @agentdocs1/mcp-server --httpresolves and downloads the malicious package without requesting confirmation.- The package executes with the permissions of the Agent process.
- The malicious package reads
API_KEYandAGENTDOCS_URLfrom its environment. - It can use those credentials to query accessible organizational records, tran ...[truncated 721 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version, for example
@agentdocs1/mcp-server@x.y.z, rather than allowing npm to resolve the current release. - Use a lockfile and verify package integrity against an approved cryptographic hash.
- Remove
-ywhere possible so unexpected package retrieval does not occur without confirmation. - Prefer a preinstalled, internally mirrored, or vendored dependency that has passed security review.
- Configure the package manager to use a trusted registry and apply package provenance verification.
- Run the MCP server in a sandbox or container with restricted filesystem, process, and outbound-network permissions.
- Supply a narrowly scoped, short-lived API token limited to the required food-safety dataset and read-only operations where feasible.
- Monitor dependency releases and rotate the API token immediately if package compromise is suspected.
- Pin the dependency to an exact, reviewed version, for example
