T08 · Insecure Dependencies
- Location
SKILL.md:64- Finding
Unpinned npm Package Is Downloaded and Executed with Access to an API Key
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 64–73
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: Mediumjson { "mcpServers": { "agentwyre": { "command": "npx", "args": ["agentwyre-mcp"], "env": { "AGENTWYRE_API_KEY": "your_key" } } } }Technical Analysis
The documented MCP configuration invokes
npx agentwyre-mcpwithout specifying an exact package version, integrity hash, lockfile, verified publisher, or reviewed source reference. If the package is not already installed locally,npxcan retrieve it from the npm registry and immediately execute it. Consequently, the code that runs may change after the Skill has been reviewed.The launched package is also explicitly given
AGENTWYRE_API_KEY. Any malicious or compromised package release—and potentially malicious code in its dependency tree—would execute with the local user's permissions and could read and exfiltrate that credential.This behavior is not required for the core helper script, which uses only Python standard-library modules. It therefore introduces avoidable supply-chain exposure beyond the minimum privileges needed to query the declared API.
Attack Path
- An attacker compromises the
agentwyre-mcpnpm package, its publisher account, or a transitive dependency, or causes an unsafe package version to be published. - A user adopts the MCP configuration from
SKILL.md. - The MCP client invokes
npx agentwyre-mcp. npxdownloads the currently resolved package version when a trusted local copy is unavailable.- The downloaded package executes under the user's account and receives
AGENTWYRE_API_KEYin its environment. - Malicious package code can read and exfiltrate the API key, access files available to the user, make network requests, or perform other actions permitted to that process.
Impact Assessment
Successful exploitation could expose the AgentWyre API credential and permi ...[truncated 577 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
agentwyre-mcpto an explicitly reviewed, immutable version rather than resolving the latest available release. - Install the dependency through a committed lockfile and use deterministic installation, such as
npm ci, instead of allowingnpxto download code at runtime. - Verify package provenance, publisher identity, repository ownership, release signatures or attestations, and registry integrity metadata before installation.
- Prefer invoking a previously installed and reviewed local binary with automatic package downloading disabled.
- Review and lock transitive dependencies, and use automated dependency scanning to detect compromised or vulnerable releases.
- Provide the API key only after package authenticity has been established. Use a narrowly scoped, revocable credential and avoid exposing unrelated environment variables to the process.
- Run the MCP server in a restricted environment with minimal filesystem and network access where practical.
- Document the official source repository and approved package checksum or integrity value so users can validate the installed artifact.
- Pin
