Back to skill

Security audit

Zerion Api

Security checks for vulnerabilities and agentic risk

Overview

This Zerion skill is mostly purpose-aligned, but it unsafely tells artifacts to send a user's Zerion API key inside Anthropic prompt text.

Review before installing. This skill can help query Zerion wallet and token data, but users should not paste reusable API keys into chat or generated dashboards that send the key inside model prompts. Prefer a version that uses a dedicated secret/auth channel or direct Zerion Authorization headers and discloses wallet-data privacy implications.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:25
Finding
Zerion API Key Exposed Through Chat and Third-Party Model Prompts## Vulnerability Details **File Location**: `SKILL.md`, lines 25-26, 45-60, and 171-186 **Vulnerability Type**: Sensitive credential exposure across unnecessary trust boundaries **Risk Level**: High ### Vulnerable Code The Skill directs the user to submit the API key through ordinary chat and retain it in conversational memory: ```markdown 1. **At the start of any Zerion-related task**, if no API key has been provided yet, ask: *"To query Zerion, I'll need your API key. You can find it at https://dashboard.zerion.io/. Please paste it here."* 2. **Store the key in memory** for the duration of the conversation. Never write it to files, display it in artifacts, or log it. 3. **Pass the key** to the MCP server or REST calls as described below. ``` It then instructs generated artifacts to interpolate the key into natural-language prompt content: ```markdown When building artifacts that call the Anthropic API with MCP, include the key in the inner prompt so the inner Claude can authenticate: ```javascript mcp_servers: [ { type: "url", url: "https://developers.zerion.io/mcp", name: "zerion-mcp" } ] ``` **Important**: In artifacts, receive the API key as a prop or state variable — never hardcode it. Example pattern: ```jsx // User inputs key via a secure input field (type="password") const [apiKey, setApiKey] = useState(""); // Pass key to inner Claude prompt so MCP calls authenticate const prompt = `Using the Zerion API key: ${apiKey}, get portfolio for wallet 0x...`; ``` ``` A later example explicitly sends the prompt containing the credential to the Anthropic API: ```javascript const response = await fetch("https://api.anthropic.com/v1/messages", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ model: "claude-sonnet-4-20250514", max_tokens: 1000, messages: [ { role: "user", content: `Use the Ze ...[truncated 3510 chars]
Remediation
## Remediation Suggestions 1. **Do not request reusable credentials in ordinary chat.** Collect the key through a platform-provided secret input or credential-management interface that excludes it from conversation history. 2. **Never place the key in model prompt content.** Remove all examples that interpolate `${apiKey}` into `messages[].content`. 3. **Use a dedicated authentication channel.** Supply the key directly to Zerion through the documented HTTP `Authorization` header or a trusted MCP secret/header configuration that does not expose it to the model. 4. **Move API access to a controlled backend.** Generated browser artifacts should call a narrowly scoped server-side proxy rather than handling reusable Zerion credentials in React state. 5. **Enforce destination restrictions.** Ensure the credential can only be transmitted to approved Zerion endpoints over TLS and cannot be forwarded to arbitrary MCP servers, model providers, URLs, or tools. 6. **Apply secret redaction.** Configure application, proxy, telemetry, and error logging to redact authorization headers and values matching Zerion key formats. 7. **Minimize credential lifetime and scope.** Prefer short-lived, least-privileged tokens where supported, and clear ephemeral credential state immediately after the request. 8. **Rotate exposed credentials.** Users who followed the documented workflow should revoke or rotate their Zerion keys and review usage for unauthorized activity. 9. **Update security guidance and examples.** Replace the vulnerable snippets with backend or MCP secret-injection examples, and explicitly prohibit transmitting credentials as natural-language content.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill tells the implementer to pass the user's API key into prompts to another model/API without a clear, explicit warning that the credential will be transmitted beyond Zerion. Users are instructed to provide the key for Zerion access, but the skill silently broadens its exposure to Anthropic prompt content, undermining informed consent and secret-handling boundaries.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The manifest description says to use the skill for broad terms like "portfolio," "positions," "transactions," "balance," and "holdings," as well as "any crypto/DeFi analytics queries." These triggers overlap with common finance and analytics requests and do not clearly bound when the skill should not activate, increasing the risk of accidental invocation.

Context-Inappropriate Capability

Medium
Confidence
98% confidence
Finding
The skill explicitly instructs developers to place the user's Zerion API key into the inner prompt sent to the Anthropic Messages API. That transmits a credential to an additional external service and model context where it may be retained, logged, inspected, or mishandled, violating least-privilege expectations for API secrets. In this skill context, the key is only needed for Zerion authentication, so forwarding it through LLM prompt text is unnecessarily dangerous.

Context-Inappropriate Capability

Medium
Confidence
99% confidence
Finding
The example artifact code includes the Zerion API key verbatim inside the `messages` content sent to `https://api.anthropic.com/v1/messages`. This exposes the secret to a third-party API and to model processing even though the credential is not required as natural-language input, creating avoidable risk of leakage through logs, telemetry, prompt inspection, or downstream handling.

External Transmission

Medium
Category
Data Exfiltration
Content
```javascript
// apiKey comes from a password input, never hardcoded
const response = await fetch("https://api.anthropic.com/v1/messages", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
Confidence
90% confidence
Finding
The external transmission to the Anthropic Messages API becomes a real vulnerability in context because the surrounding example sends sensitive material, including the Zerion API key, in the request body. External network use alone is not inherently unsafe, but here it materially expands the exposure surface for a credential and linked wallet analytics queries.

External Transmission

Medium
Category
Data Exfiltration
Content
```javascript
// apiKey comes from a password input, never hardcoded
const response = await fetch("https://api.anthropic.com/v1/messages", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
Confidence
90% confidence
Finding
The external transmission to the Anthropic Messages API becomes a real vulnerability in context because the surrounding example sends sensitive material, including the Zerion API key, in the request body. External network use alone is not inherently unsafe, but here it materially expands the exposure surface for a credential and linked wallet analytics queries.

External Transmission

Medium
Category
Data Exfiltration
Content
}
  },
  "relationships": {
    "chart_hour": { "links": { "related": "https://api.zerion.io/v1/fungibles/.../charts/hour" } },
    "chart_day": { "links": { "related": "..." } },
    "chart_week": { "links": { "related": "..." } },
    "chart_month": { "links": { "related": "..." } },
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Low
Confidence
82% confidence
Finding
This markdown documents endpoints that retrieve transaction history, balances, NFT holdings, and PnL for a wallet address, which can expose sensitive financial activity and holdings. The file does not include any warning or disclosure about the privacy implications of querying or sharing wallet addresses and associated portfolio data.

Static analysis

No suspicious patterns detected.