Back to skill

Security audit

Agentic Money

Security checks for vulnerabilities and agentic risk

Overview

This skill is for Ethereum payments, but its examples ask agents to run unpinned JavaScript tools with wallet private keys and can submit transactions without a hard approval gate.

Review this carefully before installing. Use only a dedicated low-balance wallet, prefer testnet first, pin and install dependencies locally with a lockfile instead of using npx, and require the agent to show the exact network, recipient, amount, task ID, and gas estimate before any signing action.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:43
Finding
Unpinned Third-Party Packages Execute with Access to Wallet Credentials<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 43, 84–135, 162–192, and 377–383 **Vulnerability Type**: Unpinned and mutable JavaScript dependencies **Risk Level**: Medium ### Vulnerable Code ```bash npm install @ethcf/agenticmoney ethers ``` The Skill repeatedly invokes `tsx` through `npx`, including: ```bash npx tsx -e " import { createAgentSDK, NETWORKS } from '@ethcf/agenticmoney'; import { ethers } from 'ethers'; const provider = new ethers.JsonRpcProvider('https://ethereum-sepolia.publicnode.com'); const wallet = new ethers.Wallet(process.env.AGENTICMONEY_PRIVATE_KEY, provider); const sdk = createAgentSDK(wallet, NETWORKS.sepolia); ``` The troubleshooting section also recommends installing an unpinned global package: ```bash npm install -g tsx # Or use: npx tsx -e "..." ``` ### Technical Analysis The Skill installs `@ethcf/agenticmoney`, `ethers`, and `tsx` without exact version constraints or integrity verification. It also uses `npx tsx`, which can retrieve and execute a currently published package when a trusted local copy is unavailable. These packages execute in a process that reads `AGENTICMONEY_PRIVATE_KEY`. Therefore, dependency code has access to the wallet credential and can influence transaction construction, recipients, values, RPC interactions, and signing behavior. Because package versions are not pinned and no lockfile, integrity hash, or provenance check is specified, the effective code executed by the instructions can change after the Skill has been reviewed. A compromised maintainer account, malicious package update, registry compromise, or dependency-resolution attack could introduce hostile code without modifying `SKILL.md`. ### Attack Path 1. An attacker compromises a package maintainer, package release, transitive dependency, or relevant registry resolution path. 2. The attacker publishes a malicious version of `tsx`, `ethers`, `@ethcf/agenticmoney`, or one of their dependencies. 3. A user follows ...[truncated 999 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to an exact, audited version rather than accepting the latest compatible release. 2. Provide and enforce a committed lockfile with verified integrity metadata. 3. Use `npm ci` instead of unconstrained `npm install` for reproducible installation. 4. Install `tsx` as a pinned local development dependency and invoke the local binary rather than using an unpinned global installation or dynamic `npx` download. 5. Consider `npm ci --ignore-scripts` where package functionality permits it, and audit any package that requires lifecycle scripts. 6. Verify package provenance, publisher identity, signatures, and registry source before installation. 7. Run blockchain tooling in an isolated environment with minimal network and filesystem access. 8. Avoid exposing a high-value private key directly to general-purpose dependency code. Prefer a restricted signer, hardware wallet, delegated low-balance wallet, or external signing process. 9. Re-audit dependencies and their transitive dependency trees before updating pinned versions. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:192
Finding
Transaction Example Does Not Programmatically Enforce Explicit User Approval<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 192–219 **Vulnerability Type**: Missing authorization gate before an irreversible blockchain transaction **Risk Level**: Medium ### Vulnerable Code ```bash npx tsx -e " import { createAgentSDK, ECFEscrow, NETWORKS } from '@ethcf/agenticmoney'; import { ethers } from 'ethers'; const MAX_DEPOSIT = ethers.parseEther('0.01'); // Safety cap const amount = ethers.parseEther('0.001'); if (amount > MAX_DEPOSIT) throw new Error('Exceeds 0.01 ETH safety cap'); const provider = new ethers.JsonRpcProvider('https://ethereum-sepolia.publicnode.com'); const wallet = new ethers.Wallet(process.env.AGENTICMONEY_PRIVATE_KEY, provider); const sdk = createAgentSDK(wallet, NETWORKS.sepolia); const escrow = new ECFEscrow(wallet, { escrowAddress: NETWORKS.sepolia.escrow }); const agents = await sdk.discover('code-review'); const agent = agents[0]; const taskId = ECFEscrow.generateTaskId(); console.log('About to deposit', ethers.formatEther(amount), 'ETH to', agent.address); // Agent should confirm with user here before proceeding await escrow.deposit({ taskId, serviceAgent: agent.address, amount, clientAttestationUID: process.env.MY_ATTESTATION_UID, serviceAttestationUID: agent.attestationUid, }); console.log('Hired! Task ID:', taskId); " ``` ### Technical Analysis The Skill states that the Agent must confirm transactions with the user, but the executable example does not enforce that requirement. The comment instructing the Agent to confirm is immediately followed by `escrow.deposit()`. Printing transaction details is not an authorization control, and the script has no approval input, confirmation token, process boundary, or conditional check that prevents submission. The recipient is also selected as `agents[0]` from externally obtained discovery results without validating the address, attestation, quoted price, expected identity, or correspondence with the user's selected agent. Although the a ...[truncated 1789 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Separate transaction preparation and transaction submission into distinct commands or process phases. 2. Before signing, produce a canonical transaction summary containing: - Chain ID and network name - Action type - Contract and service-agent addresses - Amount and estimated maximum gas fee - Task ID - Client and service attestation identifiers 3. Require a fresh, explicit user approval that is cryptographically or structurally bound to that exact summary. 4. Abort by default if approval is missing, expired, ambiguous, or refers to different transaction parameters. 5. Validate the RPC chain ID against the expected network immediately before simulation and signing. 6. Validate addresses with checksum and zero-address checks, and verify attestations on-chain. 7. Do not automatically select `agents[0]`. Require the user to identify the intended agent and verify its address, price, reputation, endpoint, and attestation. 8. Query and enforce the selected provider's quoted price rather than relying only on a hardcoded example amount. 9. Simulate or estimate the transaction and re-display any changed fees or parameters before signing. 10. Apply spending limits immediately before submission and include cumulative or time-based limits to prevent repeated deposits. 11. Implement equivalent confirmation gates for registration, claims, disputes, resolutions, withdrawals, network changes, and every other state-changing operation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (11)

Rp1

Medium
Category
MCP Rug Pull
Confidence
85% confidence
Finding
The skill repeatedly instructs users to run inline scripts via `npx tsx` without pinning an exact version of the executable or isolating execution to a preinstalled dependency. `npx` may resolve and execute code from the network, so a compromised or unexpected package version could run arbitrary code in a context that handles wallet private keys and can initiate blockchain transactions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
85% confidence
Finding
This usage of `npx tsx` is a supply-chain execution risk because it may fetch and run whatever version is currently resolved rather than a reviewed, fixed version. In this skill, the executed script loads `AGENTICMONEY_PRIVATE_KEY`, increasing the blast radius from generic code execution to wallet compromise or unauthorized transaction signing.

Rp1

Medium
Category
MCP Rug Pull
Confidence
85% confidence
Finding
Running inline blockchain interaction code through unpinned `npx tsx` creates a real risk of executing malicious or altered dependency code. Because this skill is specifically designed for Ethereum wallet operations, any compromise could expose private keys, alter recipient addresses, or trigger unintended on-chain actions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
85% confidence
Finding
The `npx tsx` invocation here is another instance of unpinned remote tool execution. Even though the example is for discovery rather than payment, the script still initializes a wallet from an environment variable, so malicious dependency resolution could leak credentials or manipulate outputs used in later payment decisions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
This `npx tsx` example performs agent registration, which can result in signed on-chain transactions. If `npx` resolves a compromised package or unexpected version, the attacker gains an opportunity to execute arbitrary code in a wallet-enabled process and potentially redirect funds or exfiltrate the private key.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
This is the most sensitive example because it leads directly to escrow deposit logic and transaction signing while using unpinned `npx tsx`. In context, a dependency hijack could not only execute arbitrary code but also interfere with recipient selection, task parameters, or the signing flow, causing direct loss of funds.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
Although this command is for checking task status, it still uses unpinned `npx tsx` and constructs a wallet from an environment variable. That means a package-resolution compromise can still execute arbitrary code and access secrets, even in what appears to be a read-only workflow.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
This `npx tsx` invocation initiates a claim flow in escrow and uses wallet credentials in-process. Because it is both unpinned and transaction-capable, exploitation could result in arbitrary code execution, key theft, or malicious modification of claim parameters that affect payment recovery.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
The dispute flow example again combines unpinned `npx` execution with blockchain signing operations and wallet-secret access. In this context, a supply-chain compromise could manipulate the dispute bond, task ID, or withdrawal flow, potentially causing direct fund loss or denial of access to funds.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
Even this wallet-balance example uses unpinned `npx tsx` while loading the private key into the process. That unnecessarily exposes credentials to a network-resolved executable, turning a simple read operation into a supply-chain risk with potential secret exfiltration.

Rp1

Medium
Category
MCP Rug Pull
Confidence
83% confidence
Finding
The troubleshooting guidance continues recommending `npx tsx` without addressing version pinning or package integrity. Because the skill revolves around wallet-enabled code execution, normalizing this pattern increases the likelihood that users run unreviewed code fetched at execution time.

Static analysis

No suspicious patterns detected.