Back to skill

Security audit

PRISM OS SDK

Security checks for vulnerabilities and agentic risk

Overview

The skill is advertised as read-only financial data, but the inspected code includes account key management and transaction-related capabilities that deserve review before installation.

Install only if you are comfortable giving this package a PRISM API key and reviewing its non-read-only capabilities. Avoid using production credentials with a custom baseUrl, do not let an agent invoke developer key-management methods unattended, and treat any execution, webhook, or watch functionality as higher-risk remote account activity rather than passive market-data lookup.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/modules/developer-agent.ts:28
Finding
Read-Only Skill Exposes Account Credential Management Operations<![CDATA[ ## Vulnerability Details **File Location**: `src/modules/developer-agent.ts:28-56` **Related Locations**: `SKILL.md:3,13-20`; `src/index.ts:94,128` **Vulnerability Type**: Least-privilege violation through account credential management **Risk Level**: High ### Technical Analysis The Skill declares itself to be a read-only, data-retrieval-only SDK: ```markdown description: Financial data SDK for AI Agents. 218+ read-only endpoints for market data, prices, fundamentals. Built for Cursor, Claude, OpenClaw. Data retrieval only. ``` It further states: ```markdown - **Read-only API** — fetches public market data only - **No wallet access** — does not interact with wallets or private keys - **No trading execution** — execute modules are for quote simulation only, not live trades - **Data only** — returns JSON market data for analysis ``` However, the publicly exported `DeveloperModule` provides authenticated account credential creation, rotation, verification, and purported revocation: ```ts /** Create a new API key */ async createKey(params: { name: string; description?: string; tier?: string; expires_in_days?: number; }): Promise<{ key: string; key_id: string; [k: string]: unknown }> { return this.c.post('/auth/keys', params); } /** List your API keys */ async listKeys(include_revoked = false): Promise<unknown[]> { return this.c.get('/auth/my/keys', { params: { include_revoked } }); } /** Revoke an API key */ async revokeKey(keyId: string): Promise<void> { // DELETE — use post trick with method override, or add delete to client if needed await this.c.get(`/auth/my/keys/${encodeURIComponent(keyId)}`); } /** Rotate an API key (get a new secret) */ async rotateKey(keyId: string): Promise<{ key: string; [k: string]: unknown }> { return this.c.post(`/auth/my/keys/${encodeURIComponent(keyId)}/rotate`, {}); } /** Verify an API key is valid */ async verifyKey(key: string): Promise<{ valid: boolean; tier?: string; [k: string]: unknow ...[truncated 1818 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove credential-management operations from the read-only SDK. 2. Move `createKey`, `rotateKey`, `revokeKey`, and `verifyKey` into a separately distributed administrative package. 3. Require a distinct administrative credential or OAuth scope that is not accepted by market-data endpoints. 4. Do not instantiate or export administrative modules by default. 5. Require explicit user confirmation immediately before any credential mutation. 6. Redact returned secrets from logs, telemetry, error messages, and agent transcripts. 7. Return newly created secrets only through a dedicated secure-secret interface. 8. Update `SKILL.md` and user documentation to accurately disclose any retained account-management capabilities. 9. Add authorization tests proving that ordinary read-only keys cannot invoke credential-management endpoints. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/modules/dex/index.ts:123
Finding
Compiled Modules Support Signed Transaction Broadcasting and Financial Execution Despite Read-Only Claims<![CDATA[ ## Vulnerability Details **File Location**: `src/modules/dex/index.ts:123-184` **Related Locations**: `src/modules/execute/index.ts:24-273`; `SKILL.md:17-20`; `tsconfig.json:14` **Vulnerability Type**: Undisclosed transaction execution and wallet-signing workflow **Risk Level**: High ### Technical Analysis The Skill claims that it has no wallet access and that execution modules perform quote simulation only. The DEX module nevertheless implements a complete transaction lifecycle: quote retrieval, unsigned transaction construction, external signing, and signed-transaction broadcasting. ```ts // ───────────────────────────────────────────── // EXECUTION // ───────────────────────────────────────────── /** * Build unsigned transaction — agent submits with its own signer */ async buildSwapTx(params: SwapParams): Promise<{ to: string; data: string; value: string; gasLimit: string; chain: ChainId; quoteId: string; expiresAt: number; }> { const quote = await this.getQuote(params); return this.client.post('/dex/build-tx', { quoteId: quote.quoteId, ...params }); } /** * Dry run — preview exactly what will happen without executing */ async simulateSwap(params: SwapParams): Promise<{ willSucceed: boolean; expectedOutput: string; priceImpact: number; gasEstimate: string; warnings: string[]; }> { const quote = await this.getQuote(params); return this.client.post('/dex/simulate', { quoteId: quote.quoteId }); } /** * Full execution — requires a signer function or private key (handled externally) * Agent passes signed transaction back for broadcasting */ async executeSwap( params: SwapParams, signTransaction: (txData: unknown) => Promise<string> ): Promise<{ txHash: string; status: 'success' | 'failed' | 'pending'; inputAmount: string; outputAmount: string; gasUsed: string; timestamp: number; }> { // 1. Get quote const quote = await this.getQuote(params); // 2. Build unsigned tx const txData = a ...[truncated 3288 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `dex`, `execute`, payment, and signed-transaction broadcasting modules from the read-only package and its TypeScript compilation scope. 2. Publish execution functionality as a separately named and separately permissioned package. 3. Ensure read-only API credentials cannot authorize `/execute/*` or `/dex/broadcast`. 4. Require explicit, transaction-specific user confirmation before invoking any signer. 5. Present the transaction destination, calldata interpretation, value, token approvals, chain, slippage, and maximum fees before signing. 6. Cryptographically or locally verify that the transaction returned by `/dex/build-tx` matches the user-approved quote. 7. Apply wallet allowlists, spending limits, chain allowlists, token allowlists, and maximum-slippage controls. 8. Never accept raw private keys; use constrained wallet-provider interfaces. 9. Disable recurring and conditional execution by default. 10. Correct `SKILL.md`, README, architecture documentation, and package metadata if execution capabilities are intentionally retained. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
src/core/client.ts:23
Finding
API Credential Is Forwarded to a Caller-Controlled Base URL Without HTTPS Enforcement<![CDATA[ ## Vulnerability Details **File Location**: `src/core/client.ts:23-31` **Related Locations**: `src/core/client.ts:54-60,87-94`; `src/index.ts:24-27,104-107`; `README.md:156-161` **Vulnerability Type**: Unsafe credential forwarding and transport configuration **Risk Level**: Medium ### Technical Analysis The HTTP client accepts an unrestricted `baseUrl` and attaches the PRISM API key to every GET and POST request: ```ts constructor(config: { apiKey: string; baseUrl?: string; timeout?: number }) { this.apiKey = config.apiKey; this.baseUrl = (config.baseUrl ?? 'https://api.prismapi.ai').replace(/\/$/, ''); this.timeout = config.timeout ?? 10_000; } private buildUrl(path: string, params?: Record<string, string | number | boolean | undefined>): string { const url = new URL(`${this.baseUrl}${path}`); if (params) { for (const [k, v] of Object.entries(params)) { if (v !== undefined && v !== null) url.searchParams.set(k, String(v)); } } return url.toString(); } ``` GET requests transmit the credential as follows: ```ts const res = await fetch(url, { method: 'GET', headers: { 'X-API-Key': this.apiKey, 'Accept': 'application/json', 'User-Agent': 'prism-os-sdk/1.0', }, signal: controller.signal, }); ``` POST requests do the same: ```ts const res = await fetch(url, { method: 'POST', headers: { 'X-API-Key': this.apiKey, 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'prism-os-sdk/1.0', }, body: JSON.stringify(body), signal: controller.signal, }); ``` No validation requires the destination to be `https://api.prismapi.ai`, and no check requires HTTPS. This behavior is not covert exfiltration because the caller must supply or influence the custom URL. Nevertheless, configuration injection, unsafe environment configuration, or accidental use of an HTTP endpoint can disclose the API key. The network activity flagged in `src/modules/crypto.ts` consists ...[truncated 1305 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require `https:` for all configured service URLs. 2. Pin credential-bearing requests to `https://api.prismapi.ai`. 3. If custom endpoints are necessary, require an explicit option such as `allowCredentialForwardingToCustomOrigin`. 4. Compare the normalized destination origin against an allowlist before attaching `X-API-Key`. 5. Use separate credentials for development, testing, proxies, and production. 6. Do not send the production PRISM key to localhost, mock servers, or third-party proxies by default. 7. Fail closed when URL parsing, origin validation, or TLS requirements are not satisfied. 8. Document the credential-forwarding implications of `baseUrl`. 9. Add tests confirming that credentials are omitted or requests are rejected for unauthorized origins. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
src/modules/developer-agent.ts:43
Finding
API Key Revocation Method Uses GET Instead of DELETE and May Leave Compromised Keys Active<![CDATA[ ## Vulnerability Details **File Location**: `src/modules/developer-agent.ts:43-46` **Vulnerability Type**: Broken security-control implementation **Risk Level**: Medium ### Technical Analysis The module documentation identifies the revocation endpoint as a DELETE operation: ```ts /** * Developer & Agent Utilities * * POST /auth/keys * GET /auth/my/keys * DELETE /auth/my/keys/{key_id} * POST /auth/my/keys/{key_id}/rotate */ ``` The implementation nevertheless performs an authenticated GET request: ```ts /** Revoke an API key */ async revokeKey(keyId: string): Promise<void> { // DELETE — use post trick with method override, or add delete to client if needed await this.c.get(`/auth/my/keys/${encodeURIComponent(keyId)}`); } ``` HTTP GET should not perform destructive state changes. Unless the server implements an undocumented and unsafe GET-based revocation behavior, this request will not revoke the key. Because the method returns `Promise<void>` and does not validate a revocation state, callers may incorrectly conclude that the credential has been disabled. ### Attack Path 1. A PRISM API key is suspected or confirmed to be compromised. 2. A user or automated incident-response agent invokes `prism.developer.revokeKey(keyId)`. 3. The SDK sends GET rather than DELETE. 4. The server returns key information, an error, or another non-revocation response. 5. The method completes without verifying that the key is revoked. 6. The user or agent assumes remediation succeeded. 7. An attacker continues using the still-active credential. ### Impact Assessment This flaw can prolong unauthorized access after credential compromise. The attacker retains whatever permissions the affected API key already possessed, potentially including: - Continued access to authenticated API endpoints. - API quota consumption. - Access to account-specific usage information. - Credential administration if the key has elevated permissions. - Execution-related ...[truncated 168 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Add a dedicated DELETE method to `PrismClient`: ```ts async delete<T = unknown>(path: string): Promise<T> { const url = this.buildUrl(path); const res = await fetch(url, { method: 'DELETE', headers: { 'X-API-Key': this.apiKey, 'Accept': 'application/json', 'User-Agent': 'prism-os-sdk/1.0', }, }); if (!res.ok) { const body = await res.text().catch(() => ''); throw new PrismApiError(res.status, res.statusText, body, path); } return res.json() as Promise<T>; } ``` 2. Implement revocation with the documented HTTP method: ```ts async revokeKey(keyId: string): Promise<void> { await this.c.delete(`/auth/my/keys/${encodeURIComponent(keyId)}`); } ``` 3. Verify the server response explicitly indicates a revoked state. 4. Optionally perform a follow-up validation that the revoked credential is rejected. 5. Return a structured result instead of `void`, including the key ID and revocation timestamp. 6. Add integration tests covering successful revocation, nonexistent key IDs, authorization failures, and already-revoked keys. 7. Avoid method-override workarounds unless the server explicitly supports and authenticates them. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (93)

Known Vulnerable Dependency: handlebars==4.7.8 — 8 advisory(ies): CVE-2026-33916 (Handlebars.js has Prototype Pollution Leading to XSS through Partial Template In); CVE-2026-33937 (Handlebars.js has JavaScript Injection via AST Type Confusion); CVE-2026-33938 (Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @part) +5 more

Critical
Category
Supply Chain
Confidence
92% confidence
Finding
handlebars 4.7.8 has a long history of prototype-pollution and template/code-injection issues, and here it is pulled in transitively by ts-jest as a development dependency. While this is not direct runtime exposure, it becomes dangerous if tests, code generation, or build tooling compile attacker-controlled templates or run in shared CI environments, potentially leading to code execution or poisoned object state during the build process.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The finding suggests broad support for execution modeling, portfolios, webhook configuration, and general batch agent operations, which exceeds the declared role of a passive financial data SDK. In an agent environment, webhook and batch-operation support can create indirect outbound actions and orchestration behavior that users did not knowingly authorize.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The architecture document conflicts with the stated skill metadata by describing concrete trade execution capabilities such as swap execution and transaction simulation in a supposedly read-only financial SDK. This kind of scope misrepresentation is dangerous because an agent integrator may grant trust, permissions, or deployment approval under the false assumption that the skill cannot perform state-changing financial actions.

Intent-Code Divergence

High
Confidence
97% confidence
Finding
The roadmap describes numerous execution and automation features including arbitrage, DCA, TWAP, batch execution, conditional automation, and treasury management, which materially exceed a read-only data SDK. Even if aspirational, presenting these capabilities without clear scoping can mislead agent platforms and users into underestimating the financial and operational risk of integrating the skill.

Intent-Code Divergence

High
Confidence
93% confidence
Finding
The top-level documentation frames the package as a universal finance SDK while the broader skill metadata claims a read-only finance data SDK. That contradiction matters because it can mislead reviewers and automated policy systems about the true risk profile, especially when the same file later documents execution functions.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The documentation explicitly includes `prism.execute.placeOrder` and related execution features, which directly contradict the skill's stated read-only, data-retrieval-only purpose. In an agent context, undocumented or unjustified trade execution materially increases the chance of unauthorized financial actions, especially if downstream systems assume the skill is safe because it is described as read-only.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
Order placement is a powerful transactional capability and is unjustified in a skill presented as data retrieval only. This mismatch can cause users, agents, or approval systems to grant the skill broader trust than warranted, enabling unintended trades, financial loss, or abuse through prompt-driven invocation.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The skill is described as a read-only financial data SDK, but this example scaffolds transactional behavior such as swap execution and DeFi deposit flow, plus ongoing monitoring. That mismatch is dangerous because an agent integrator may trust the package as non-actionable data-only software while inheriting patterns that normalize autonomous fund movement or action hooks.

Known Vulnerable Dependency: brace-expansion==1.1.12 — 4 advisory(ies): CVE-2026-13149 (brace-expansion: DoS via exponential-time expansion of consecutive non-expanding); CVE-2026-33750 (brace-expansion: Zero-step sequence causes process hang and memory exhaustion); CVE-2026-14257 (brace-expansion: DoS via unbounded expansion length causing an out-of-memory pro) +1 more

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: browserslist==4.28.1 — 2 advisory(ies): CVE-2026-73088 (Browserslist: Uncaught crash / prototype write via untrusted browserslist-stats.); CVE-2026-73089 (Browserslist: Unbounded memory growth (no cache eviction) via distinct query res)

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: js-yaml==3.14.2 — 4 advisory(ies): CVE-2026-84375 (js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources); CVE-2026-59869 (js-yaml: YAML merge-key chains can force quadratic CPU consumption); GHSA-5p4m-2wfm-xmqj (JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026) +1 more

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: minimatch==3.1.2 — 3 advisory(ies): CVE-2026-27904 (minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regu); CVE-2026-26996 (minimatch has a ReDoS via repeated wildcards with non-matching literal in patter); CVE-2026-27903 (minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adja)

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: picomatch==2.3.1 — 2 advisory(ies): CVE-2026-33672 (Picomatch: Method Injection in POSIX Character Classes causes incorrect Glob Mat); CVE-2026-33671 (Picomatch has a ReDoS vulnerability via extglob quantifiers)

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The skill metadata and description present this SDK as read-only and limited to data retrieval, but the client exposes a generic POST primitive capable of sending arbitrary JSON to any configured API path. In an agent context, this creates a capability mismatch: downstream code or prompt-influenced tool use could invoke state-changing operations if supported by the backend now or in the future, violating least privilege and user expectations.

Static analysis

No suspicious patterns detected.