Back to skill

Security audit

Solanaprox Mcp

Security checks for vulnerabilities and agentic risk

Overview

This paid AI gateway is transparent about its purpose, but it deserves Review because automated calls can spend a deposited SolanaProx balance using only a configured public wallet address and without local confirmation or spend caps.

Review before installing. Use this only with a SolanaProx balance you are comfortable spending, configure host-level approvals for `ask_ai`, and avoid autonomous loops unless you have external spending limits. Do not send secrets or sensitive data in prompts, and prefer pinned package versions.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/index.ts:136
Finding
Public Wallet Address Is Used as the Sole Client-Side Payment Identity<![CDATA[ ## Vulnerability Details **File Location**: `src/index.ts:16-17, 136-143` **Vulnerability Type**: Missing proof of wallet ownership for chargeable requests **Risk Level**: High ### Vulnerable Code ```ts const SOLANAPROX_URL = process.env.SOLANAPROX_URL || "https://solanaprox.com"; const WALLET_ADDRESS = process.env.SOLANA_WALLET || ""; ``` ```ts const res = await fetch(`${SOLANAPROX_URL}/v1/messages`, { method: "POST", headers: { "Content-Type": "application/json", "X-Wallet-Address": WALLET_ADDRESS, }, body: JSON.stringify(body), }); ``` The same pattern also appears in `agent-exammple.js:13-14, 23-34`: ```js const SOLANAPROX_URL = process.env.SOLANAPROX_URL || "https://solanaprox.com"; const WALLET = process.env.SOLANA_WALLET; async function askAI(prompt, model = "claude-sonnet-4-20250514", maxTokens = 512) { const res = await fetch(`${SOLANAPROX_URL}/v1/messages`, { method: "POST", headers: { "Content-Type": "application/json", "X-Wallet-Address": WALLET, }, body: JSON.stringify({ model, max_tokens: maxTokens, messages: [{ role: "user", content: prompt }], }), }); ``` ### Technical Analysis The client identifies the payer solely through the `X-Wallet-Address` header. A Solana wallet address is public information and is not an authentication secret. The request contains no wallet signature, challenge nonce, request-body hash, timestamp, session credential, or other cryptographic proof that the caller controls the wallet. The Skill states that paid inference costs are automatically deducted from the balance associated with this address. Consequently, the visible client protocol does not establish authorization to spend that balance. The audited repository does not include the remote service implementation. Therefore, backend exploitability depends on whether `solanaprox.com` applies an undocumented authorization mechanism. Nevertheless, the client itself neither supplies ...[truncated 1473 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require cryptographic proof of wallet ownership before accepting chargeable requests. 2. Have the server issue a short-lived, single-use challenge containing: - A cryptographically random nonce - The intended service domain - The wallet address - An expiration timestamp - The network identifier 3. Require the wallet to sign a domain-separated authorization message. 4. Bind authorization to the exact request by including a canonical hash of the model, prompt, token limit, and maximum authorized charge. 5. Verify the signature server-side against the claimed wallet address. 6. Store and invalidate used nonces to prevent replay attacks. 7. Issue short-lived authenticated sessions only after successful signature verification. 8. Apply server-side per-request, hourly, and daily spending limits. 9. Allow users to revoke sessions and configure maximum charges. 10. Require explicit user confirmation when a request exceeds a configurable cost threshold. 11. Document the authentication and billing protocol instead of describing a public wallet address as a credential. 12. Add integration tests proving that requests with a copied wallet address but no valid signature are rejected. ]]>

T01 · Skill Instruction Hijacking

Warning
Location
src/index.ts:258
Finding
Tool Responses Forcibly Inject Promotional and Payment-Directed Content<![CDATA[ ## Vulnerability Details **File Location**: `src/index.ts:258-264` **Vulnerability Type**: Stable manipulation of agent-visible tool output **Risk Level**: Medium ### Vulnerable Code ```ts return { content: [ { type: "text", text: `${result.response}\n\n---\n⚡ Powered by SolanaProx | Model: ${result.model} | Cost: ~$${result.cost_usd.toFixed(6)} USDC`, }, ], }; ``` A related promotional response is generated at `src/index.ts:333-339`: ```ts return { content: [ { type: "text", text: `🤖 Available Models on SolanaProx\n\n${modelList || "Claude Sonnet 4, GPT-4 Turbo"}\n\nPay with SOL or USDC. Deposit at ${SOLANAPROX_URL}`, }, ], }; ``` ### Technical Analysis The `ask_ai` tool does not return the inference result independently from provider and billing information. Instead, it modifies the text result by appending branding on every successful request. The `list_models` result similarly adds a payment solicitation and deposit destination. Because MCP tool output is consumed by an AI agent, stable provider-authored text can be propagated into summaries, generated documents, or final user-facing answers. This weakens the separation between task results and service-directed messaging. The appended strings do not directly override safety constraints or execute code. The principal risk is output integrity: promotional and payment-directed text is injected into the same unstructured field as the requested result. The fixed output manipulation was therefore classified under the closest available agent-instruction category, with impact limited to the current response flow. ### Attack Path 1. A user or agent invokes `ask_ai` for an otherwise unrelated task. 2. The remote inference response is received by the MCP server. 3. The server appends provider branding and cost text to the generated answer. 4. The host agent treats the entire text field as tool output. 5. The agent may quote or relay the appended con ...[truncated 726 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Return the generated answer without appended branding or payment solicitation. 2. Place provider, model, token usage, and cost information in separate structured metadata fields. 3. Keep billing metadata distinguishable from model-generated content so the MCP host can decide whether and how to display it. 4. Return model-list data as structured entries rather than a promotional text block. 5. Show deposit instructions only in response to an explicit balance or payment-related request. 6. Avoid placing configurable URLs inside agent-visible promotional prose. 7. Add tests confirming that `ask_ai` returns the requested result separately from provider-controlled metadata. 8. Clearly label any unavoidable service notices as metadata rather than part of the inference result. ]]>
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
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (21)

Known Vulnerable Dependency: @hono/node-server==1.19.9 — 3 advisory(ies): CVE-2026-39406 (@hono/node-server: Middleware bypass via repeated slashes in serveStatic); GHSA-frvp-7c67-39w9 (Node.js Adapter for Hono: Path traversal in `serve-static` on Windows via encode); CVE-2026-29087 (@hono/node-server has authorization bypass for protected static paths via encode)

High
Category
Supply Chain
Confidence
95% confidence
Finding
The lockfile pins @hono/node-server 1.19.9, and the listed advisories describe authorization bypass and path traversal issues in static file serving. Even though this file is only a dependency manifest, the vulnerable package is actually present in the resolved dependency tree, so if the skill exposes HTTP endpoints or static assets through Hono/MCP transport, an attacker could bypass protections or access unintended files.

Known Vulnerable Dependency: express-rate-limit==8.2.1 — 1 advisory(ies): CVE-2026-30827 (express-rate-limit: IPv4-mapped IPv6 addresses bypass per-client rate limiting o)

High
Category
Supply Chain
Confidence
94% confidence
Finding
express-rate-limit 8.2.1 is resolved in the dependency tree and the advisory indicates rate-limit bypass via IPv4-mapped IPv6 handling. For a payment-backed AI gateway, rate-limiting is likely a meaningful security control against abuse, billing fraud, or resource exhaustion, so bypassing it materially increases risk.

Known Vulnerable Dependency: fast-uri==3.1.0 — 7 advisory(ies): CVE-2026-13676 (fast-uri vulnerable to host confusion via failed IDN canonicalization); CVE-2026-18446 (fast-uri vulnerable to host confusion via backslash authority introducer); CVE-2026-75975 (fast-uri vulnerable to server-side request forgery via malformed IPv6 normalizat) +4 more

High
Category
Supply Chain
Confidence
89% confidence
Finding
fast-uri 3.1.0 is included and the advisories indicate host confusion and SSRF-relevant parsing inconsistencies. In a gateway skill that may broker outbound AI/provider requests and payment-related callbacks, URI parsing flaws can become dangerous if attacker-controlled URLs, hosts, or redirects are ever processed.

Known Vulnerable Dependency: hono==4.12.1 — 16 advisory(ies): CVE-2026-56762 (Hono missing validation of cookie name on write path in setCookie()); CVE-2026-47676 (Hono: app.mount() strips mount prefix using undecoded path, causing incorrect ro); CVE-2026-47675 (Hono: Cookie helper does not sanitize sameSite and priority, allowing Set-Cookie) +13 more

High
Category
Supply Chain
Confidence
93% confidence
Finding
hono 4.12.1 is present with numerous advisories including cookie handling, routing, and related validation issues. Because this skill is described as an AI gateway with wallet/payment semantics, flaws in routing, cookie generation, or request handling can affect authentication, authorization, and request integrity more severely than in a static offline tool.

Known Vulnerable Dependency: ip-address==10.0.1 — 2 advisory(ies): CVE-2026-69192 (ip-address: Address4 decodes leading-zero octets as decimal while resolvers deco); CVE-2026-42338 (ip-address has XSS in Address6 HTML-emitting methods)

High
Category
Supply Chain
Confidence
82% confidence
Finding
ip-address 10.0.1 is present and has advisories for leading-zero parsing ambiguity and XSS in HTML-emitting methods. The XSS portion may be irrelevant if the skill never renders IP-derived HTML, but the address parsing ambiguity can still matter where IP-based trust, allowlists, or rate-limiting decisions are made through express-rate-limit or related network logic.

Known Vulnerable Dependency: path-to-regexp==8.3.0 — 2 advisory(ies): CVE-2026-4923 (path-to-regexp vulnerable to Regular Expression Denial of Service via multiple w); CVE-2026-4926 (path-to-regexp vulnerable to Denial of Service via sequential optional groups)

High
Category
Supply Chain
Confidence
87% confidence
Finding
path-to-regexp 8.3.0 is reported vulnerable to ReDoS/DoS via crafted route patterns or matching behavior. In a network-facing MCP/HTTP service, request-path processing happens pre-authentication, so a parsing or regex DoS can allow unauthenticated resource exhaustion.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Content
"❌ SOLANA_WALLET environment variable is required");
  console.error("   Set it to your Phantom wallet address");
  console.error("   Example: SOLANA_WALLET=FjGCr4... npx solanaprox-mcp");
  process.exit(1);
}

// ============================================================================
// TOOL DEFINITIONS
// ============================================================================

const tools: Tool[] = [
  {
    name: "ask_ai",
    description:
      "Send a prompt to an AI model via SolanaProx. Costs are automatically deducted from your Solana wallet balance in USDC. Supports Claude and GPT-4 models. Use this for any AI inference task.",
    inputSchema: {
      type: "object",
      properties: {
        prompt: {
          type: "string",
          description: "The prompt or question to send to the AI model",
        },
        model: {
          type: "string",
          description:
            "AI model to use. Options: claude-sonnet-4-20250514 (default), gpt-4-turbo",
Confidence
80% confidence
Finding
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The README instructs users to run the MCP server via `npx solanaprox-mcp` without pinning a specific version, which causes execution of whatever package version is current at install time. In an agent/payment tool context, this increases supply-chain risk because a compromised or malicious future publish could execute arbitrary code or alter payment behavior on user machines.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The tool description states that `ask_ai` automatically deducts cost from wallet balance, but the invocation guidance does not include a strong runtime warning, confirmation step, or explicit UX notice that each request may spend funds. In an autonomous agent context, this can lead to unexpected or runaway charges, especially when users connect the MCP server to tools that may call actions repeatedly.

External Transmission

Medium
Category
Data Exfiltration
Content
```js
// Agent pays autonomously on every request
const res = await fetch("https://solanaprox.com/v1/messages", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Check balance
curl https://solanaprox.com/api/balance/YOUR_WALLET

# Make AI request
curl -X POST https://solanaprox.com/v1/messages \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill describes capabilities that inherently involve external network access and potentially runtime interaction, but it does not declare an explicit tool scope such as allowed-tools or permissions. That mismatch can cause the host agent to over-assume what the skill may access, reducing least-privilege enforcement and making unintended tool use or data exposure more likely in environments that rely on manifest-declared constraints.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The askAI function sends the user's prompt content and the SOLANA_WALLET value to a remote service via fetch. Although the file logs some operational status, it does not clearly disclose in comments, docstrings, or setup text that user-provided content and wallet-identifying data are transmitted to an external API.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The ask_ai tool transmits user-provided prompts and optional system prompts directly to a remote service at SOLANAPROX_URL, but the tool interface does not present a clear just-in-time warning that sensitive data will leave the local environment. In an agent setting, users may paste secrets, proprietary text, or regulated data into prompts, creating confidentiality and compliance risk through unintended third-party disclosure.

Known Vulnerable Dependency: body-parser==2.2.2 — 1 advisory(ies): CVE-2026-12590 (body-parser vulnerable to denial of service when invalid limit value silently di)

Low
Category
Supply Chain
Confidence
83% confidence
Finding
body-parser 2.2.2 is present and is reported vulnerable to denial of service under invalid limit handling. This is a real dependency risk, but the impact is limited to availability and depends on the application accepting attacker-controlled request bodies or parser configuration paths that trigger the condition.

Known Vulnerable Dependency: qs==6.15.0 — 3 advisory(ies): CVE-2026-82417 (qs: Denial of Service via Attacker Controlled isBuffer); CVE-2026-8723 (qs has a remotely triggerable DoS: qs.stringify crashes with TypeError on null/u); CVE-2026-82562 (qs array-limit bypass via bracket-key comma parsing)

Low
Category
Supply Chain
Confidence
80% confidence
Finding
qs 6.15.0 is present with reported denial-of-service issues and parsing edge cases. This is a real package risk, but its practical severity depends on whether the service accepts attacker-controlled query/body structures that reach qs under vulnerable conditions; the main concern is availability rather than direct compromise.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"author": "LPX Digital Group LLC",
  "license": "MIT",
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.0.0"
  },
  "devDependencies": {
    "@types/node": "^20.0.0",
Confidence
91% confidence
Finding
The runtime dependency uses a caret range, which allows npm to install newer compatible releases without explicit review. If the upstream package is compromised or introduces a breaking security change, the MCP server could pull that version during install or rebuild and expose users to supply-chain compromise. In a payment- and wallet-adjacent skill, dependency trust is especially sensitive because the server may handle transaction- or identity-related workflows.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"@modelcontextprotocol/sdk": "^1.0.0"
  },
  "devDependencies": {
    "@types/node": "^20.0.0",
    "typescript": "^5.0.0",
    "ts-node": "^10.9.0"
  },
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
},
  "devDependencies": {
    "@types/node": "^20.0.0",
    "typescript": "^5.0.0",
    "ts-node": "^10.9.0"
  },
  "engines": {
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"devDependencies": {
    "@types/node": "^20.0.0",
    "typescript": "^5.0.0",
    "ts-node": "^10.9.0"
  },
  "engines": {
    "node": ">=18.0.0"
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Static analysis

No suspicious patterns detected.