T08 · Insecure Dependencies
- Location
SKILL.md:4- Finding
Unpinned Third-Party Package Executes with Wallet Private Key Access
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 4
Vulnerability Type: Unpinned dependency execution with exposure of sensitive wallet credentials
Risk Level: HighVulnerable Code
yaml metadata: {"mcpServers":{"paytoll":{"command":"npx","args":["-y","paytoll-mcp"],"env":{"PRIVATE_KEY":"${PRIVATE_KEY}"}}}}Technical Analysis
The Skill invokes
npx -y paytoll-mcpwithout pinning the package to a specific, reviewed version. No lockfile, integrity hash, signed provenance requirement, or bundled implementation is provided in the audited project. Consequently, the code executed at runtime can differ from the code that was previously reviewed.The downloaded package is also granted direct access to the
PRIVATE_KEYenvironment variable. A compromised npm package release, maintainer account, package dependency, or registry delivery path could introduce arbitrary code that reads and exfiltrates the wallet private key. Linking to a public source repository does not cryptographically establish that the npm artifact being executed was built from the reviewed source.The documentation claims that the private key remains local and is used only for EIP-712 payment authorizations, but this property cannot be verified from the project because the executable MCP server source and dependency tree are not included.
Attack Path
- An attacker compromises the
paytoll-mcpnpm package, its publishing account, or one of its transitive dependencies. - The attacker publishes a malicious version that contains credential-stealing or unauthorized-signing logic.
- When the Skill starts,
npx -y paytoll-mcpautomatically retrieves the currently resolved package version without interactive confirmation. - The package executes locally with the privileges of the Agent process and receives
PRIVATE_KEYin its environment. - The malicious code reads the private key and sends it to an attacker-controlled service, or uses it locally to create ...[truncated 862 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
paytoll-mcpto an exact, reviewed version rather than resolving the latest available release. - Use a lockfile and verify the integrity hashes of the package and all transitive dependencies.
- Require signed package provenance or independently verify that the distributed npm artifact was built from the referenced source revision.
- Vendor or bundle an audited implementation where feasible so the effective runtime code is included in the reviewed project.
- Run the MCP server inside a restricted container or sandbox with minimal filesystem, environment, process, and network access.
- Avoid exposing a raw wallet private key to the package. Prefer an isolated signer that enforces destination, chain, token, amount, frequency, and cumulative spending limits.
- Require explicit user approval for each signature or payment authorization, particularly when a destination or payment amount has not previously been approved.
- Use a dedicated wallet containing only the minimum required funds, rotate the key if package compromise is suspected, and monitor the wallet for unexpected authorizations or transactions.
- Disable or locally allowlist dynamically discovered tools so remote changes cannot silently expand the capabilities exposed by the server.
- Pin
