Back to skill

Security audit

Pacifica

Security checks for vulnerabilities and agentic risk

Overview

This skill is for crypto trading and its core behavior is disclosed, but it gives agents high-impact financial authority with weak confirmation, private-key handling, and install safeguards.

Review this carefully before installing. Only use it with a wallet and funds you are willing to expose to agent-operated trading risk, avoid autonomous trading unless you have separate hard limits and monitoring, verify npm package versions/provenance, and treat the generated private key as full control over funds.

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

Error
Location
SKILL.md:146
Finding

Unpinned Third-Party Packages Are Installed and Executed

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 146 and 158–161
Vulnerability Type: Supply-chain risk from mutable, unverified npm dependencies
Risk Level: High

Vulnerable Code

bash
npm install -g @pacifica-dev/cli
bash
# MCP server (Claude Code, Cursor, Windsurf, VS Code Copilot, etc.)
claude mcp add pacifica npx @pacifica-dev/mcp

# Standalone CLI
npm install -g @pacifica-dev/cli

Technical Analysis

The installation commands do not specify exact package versions or verify package integrity. Consequently, npm resolves a mutable release—normally the package's current latest distribution tag—rather than a version whose source was audited with this skill.

The npx-based MCP registration is particularly sensitive because it can download and execute package content from the registry. The global CLI installation similarly trusts package code and any applicable npm lifecycle scripts. The project contains neither the source of these packages nor a lockfile, checksum, signature, or provenance policy through which their effective contents could be verified.

This does not establish that the referenced packages are currently malicious. It creates an unsafe supply-chain boundary in which a compromised publisher account, registry response, package release, or transitive dependency can change the code executed after the skill itself has been reviewed.

Attack Path

  1. An attacker compromises the package publisher, package distribution process, registry account, or an included dependency.
  2. The attacker publishes a malicious release under the package name or changes the version selected by the mutable distribution tag.
  3. A user follows the documented installation instructions without an exact version or integrity constraint.
  4. npm downloads the attacker-controlled package content.
  5. Package installation hooks or the invoked MCP/CLI program execute with the privileges of t ...[truncated 944 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin every referenced package to a specific, reviewed version, for example by using an exact version rather than a mutable distribution tag.
  2. Maintain and distribute a lockfile that fixes all transitive dependency versions.
  3. Verify package integrity using registry integrity hashes, trusted signatures, and npm provenance where available.
  4. Document the expected publisher, registry, source repository, release hash, and verification procedure.
  5. Prefer installing from an audited local bundle or controlled internal registry instead of downloading executable content at invocation time.
  6. Avoid implicit npx downloads. Preinstall a verified package and invoke the pinned local executable.
  7. Disable npm lifecycle scripts where operationally possible, and review any scripts required by the package before installation.
  8. Run the MCP server and CLI in a sandboxed, least-privileged environment with restricted filesystem, environment-variable, network, and wallet access.
  9. Require a fresh security review before updating either package or any transitive dependency.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:82
Finding

Autonomous Trading Mode Bypasses Transaction-Specific Confirmation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 82
Vulnerability Type: Missing authorization safeguard for financially consequential operations
Risk Level: High

Vulnerable Code

text
- **Order confirmation**: For interactive use, briefly confirm order details with the user before placing. For autonomous/bot use, execute directly.

Technical Analysis

The skill explicitly permits an autonomous or bot-operated agent to execute orders without transaction-specific user confirmation. This is unsafe because the same skill provides access to leveraged market orders, limit and stop orders, order modification, margin configuration, subaccount transfers, and USDC withdrawals.

Distinguishing interactive and autonomous operation does not itself establish authorization for a particular transaction. An agent may misunderstand natural-language instructions, act on stale or manipulated market information, calculate an incorrect amount, select the wrong side, or process attacker-controlled content. Without an independent authorization gate, such an error can directly become a signed financial action.

The instruction also does not define enforceable limits for permitted symbols, position size, leverage, loss, transfer destinations, withdrawal amount, or operation frequency. Therefore, autonomous execution lacks both per-transaction confirmation and documented policy constraints.

Attack Path

  1. The Pacifica skill is operated in autonomous or bot mode.
  2. The agent receives an ambiguous, incorrect, stale, or attacker-influenced instruction or market signal.
  3. The agent interprets that input as a request to place or modify a trade.
  4. Following the documented behavior, it skips user confirmation because the operation is autonomous.
  5. The wallet-enabled tool signs and submits the state-changing request.
  6. The resulting order, leverage change, transfer, or withdrawal produces an unintended financial ef ...[truncated 819 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require explicit, transaction-specific authorization before every state-changing financial action, including autonomous operation.
  2. Present the symbol, action, side, amount, price constraints, leverage, margin mode, destination, estimated fees, and maximum potential loss before approval.
  3. Treat withdrawals, fund transfers, leverage changes, and margin-mode changes as high-risk operations requiring a separate confirmation step.
  4. Use cryptographically or session-bound approval tokens so approval for one transaction cannot authorize a modified transaction.
  5. Enforce configurable allowlists for symbols, operation types, subaccounts, and withdrawal destinations.
  6. Apply hard limits for order notional, leverage, aggregate exposure, daily loss, transfer amount, withdrawal amount, and execution frequency.
  7. Reject execution when market data is stale or when requested values differ from the confirmed transaction.
  8. Default to simulation or read-only mode for autonomous agents unless the user explicitly enables bounded trading permissions.
  9. Record tamper-evident audit logs and provide an emergency stop mechanism that cancels pending autonomous activity.
  10. Verify the resulting account state after each approved action and immediately report any discrepancy.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs users that a wallet private key is auto-generated in ~/.pacifica-mcp/config.json and suggests importing that key into external wallets, but it does not prominently warn about key exposure, filesystem compromise, backup handling, or the security implications of moving private keys between tools. Because this skill supports signed trading and withdrawals, mishandling that key could result in full account compromise and loss of funds.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill documents numerous state-changing and financially destructive actions such as market orders, withdrawals, leverage changes, margin-mode changes, and cancel-all behavior, but only gives a partial confirmation rule for 'interactive use' and even states autonomous/bot use should execute directly. In this context, inconsistent confirmation and safety gating can lead to unintended trades, fund transfers, or withdrawals triggered by ambiguous prompts or automation mistakes.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The install command uses npx @pacifica-dev/mcp without pinning to an exact version or immutable artifact, which allows whatever package version is current at execution time to run. In a skill that directly enables trading, withdrawals, and account-affecting actions, a compromised or malicious package update could immediately gain high-impact execution in the user's environment.

Content

No source excerpt is available for this finding.