Back to skill

Security audit

Handshake58 - Payments for AI Agents

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent payment purpose, but it asks users to install an unpinned global package and give it a funded wallet private key, which needs careful review before use.

Use only a dedicated low-value wallet, never a main wallet or reusable key. Before installing, verify the drain-mcp package/source yourself, prefer a pinned reviewed version, and understand that the local MCP process can sign transactions and paid requests with the configured wallet key.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Error
Location
SKILL.md:53
Finding
Unpinned Global Dependency Receives a Funded Wallet Private Key<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:48-53` (installation command), with the sensitive credential configuration at `SKILL.md:88-99` **Vulnerability Type**: Unpinned privileged third-party dependency **Risk Level**: High ### Vulnerable Code ```markdown ## Quick Start ### 1. Install ```bash npm install -g drain-mcp ``` ``` The globally installed executable is subsequently given the wallet private key: ```markdown ### 4. Configure Your MCP Client Add to your MCP config (Cursor: `.cursor/mcp.json`, Claude Desktop: `claude_desktop_config.json`): ```json { "mcpServers": { "drain": { "command": "drain-mcp", "env": { "DRAIN_PRIVATE_KEY": "0x_your_private_key" } } } } ``` ``` ### Technical Analysis The installation command retrieves and globally installs the latest version of `drain-mcp` without pinning an exact version or verifying an integrity digest. A global npm installation can execute package lifecycle scripts with the installing user's permissions. After installation, the MCP client launches the package executable and supplies it with `DRAIN_PRIVATE_KEY`. This project contains only `SKILL.md`; it does not include the package implementation, a lockfile, integrity metadata, or reproducible-build information. Consequently, the audited artifact cannot verify the package's claimed key-handling and network behavior. A compromised maintainer account, malicious package release, registry compromise, or unexpected future release could change the executable after this Skill has been reviewed. ### Attack Path 1. An attacker compromises the `drain-mcp` npm publishing account, the package supply chain, or a future package release. 2. The attacker publishes a malicious version under the same package name. 3. A user follows the documented `npm install -g drain-mcp` command, which resolves to that version because no exact version or integrity value is specified. 4. Malicious npm lifecycle code may execu ...[truncated 1083 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the installation to a reviewed, exact package version rather than resolving the latest release: ```bash npm install --global --ignore-scripts drain-mcp@4.0.2 ``` Enable lifecycle scripts only if they are documented, necessary, and separately audited. 2. Publish and verify the expected npm package integrity digest and package provenance. Require signed releases and npm provenance attestations in the release process. 3. Prefer a project-local installation backed by a committed lockfile over a global installation. Use deterministic clean installation, such as `npm ci`, and reject lockfile or integrity mismatches. 4. Include the implementation source corresponding to the distributed package in the review scope. Establish reproducible builds so reviewers can verify that the npm artifact matches the published source and version tag. 5. Run the MCP server in a restricted environment with minimum filesystem and network access. Limit outbound connections to documented Polygon RPC, directory, and explicitly approved provider endpoints. 6. Continue requiring a dedicated low-value wallet, but treat this only as defense in depth. Do not reuse the wallet for unrelated assets or grant unlimited token allowances. 7. Where possible, replace direct raw-key exposure with an isolated signer or wallet service that enforces destination, token, chain, amount, and transaction-type policies. Require explicit user approval for on-chain transactions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

External Transmission

Medium
Category
Data Exfiltration
Content
**No POL needed** — if your wallet holds $5+ USDC, free gas is provided:

```bash
curl -X POST https://handshake58.com/api/gas-station \
  -H "Content-Type: application/json" \
  -d '{"address": "0x_your_wallet_address"}'
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Scope Creep

Low
Category
Excessive Agency
Content
## Provider Categories

Providers are not limited to LLM chat. Each has a `category` and a docs endpoint.

| Category | Examples | How to Call |
|---|---|---|
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Static analysis

No suspicious patterns detected.