Back to skill

Security audit

Polymarket

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Polymarket trading integration that uses a Superior Trade API key for expected trading, funding, backtesting, and deployment workflows, with confirmation requirements for real-fund actions.

Install only if you intend to let the agent operate a Superior Trade Polymarket account. Use a dedicated, least-privilege API key if available, confirm that the configured API base URL is the legitimate Superior Trade production or UAT endpoint, and review every real-fund order, deposit, exit, and live deployment confirmation before approving it.

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

Warning
Location
SKILL.md:32
Finding

Authenticated API Key May Be Sent to an Untrusted Configured Base URL

Content
View full analysis
` for Superior Trade product API keys. Browser/session callers may use `Authorization: Bearer `. ``` ### Technical Analysis The Skill instructs the Agent to use an environment-configured API base URL and attach the `SUPERIOR_TRADE_PM_API_KEY` as an `x-api-key` header. Although two legitimate endpoints are documented, the instructions do not require the configured URL to match either endpoint. They also do not explicitly require HTTPS, reject embedded credentials, or prohibit forwarding authentication headers across redirects. Consequently, an attacker who can influence the environment configuration could supply an attacker-controlled URL. Subsequent requests made according to the Skill could disclose the API key and sensitive request data to that endpoint. This is especially significant because the declared API key is not read-only. Its documented scope includes managing trading accounts, initiating funding actions, placing immediate market orders, running backtests, and managing deployments. ### Attack Path 1. An attacker gains the ability to modify or influence the environment-configured Superior Trade API base URL. 2. The attacker changes the URL to an endpoint under their control or to an endpoint that redirects to their infrastructure. 3. The Agent follows the Skill instructions and makes a request using the configured URL. 4. The Agent attaches `SUPERIOR_TRADE_PM_API_KEY` in the `x-api-key` header, or a session token in the `Authorization` header. 5. The attacker captures the credential and any accompanying account, wallet, strategy, o ...[truncated 1061 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 20)May include surrounding context.

md
required: true
    type: api_key
externalEndpoints:
  - url: https://api.superior.trade/v3
    purpose: "Trading accounts, Polymarket onboarding/funding, immediate market orders, market discovery, filled-data backtesting, deployment planning/status, credential metadata, and logs"
  - url: https://data-api.polymarket.com
    purpose: "Read-only Polymarket public position lookup by wallet address"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 32)May include surrounding context.

md
required: true
    type: api_key
externalEndpoints:
  - url: https://api.superior.trade/v3
    purpose: "Trading accounts, Polymarket onboarding/funding, immediate market orders, market discovery, filled-data backtesting, deployment planning/status, credential metadata, and logs"
  - url: https://data-api.polymarket.com
    purpose: "Read-only Polymarket public position lookup by wallet address"

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 94)May include surrounding context.

md
2. Fetch `GET /v3/account`.
3. Set `action.from` only to a `wallet_address` returned in `items[]`. Never trust or invent an arbitrary `from` address; if the user supplied one, verify it appears in the account list before using it.
4. Check `GET /v3/account/{address}/status/polymarket` for that wallet. If onboarding, approvals, credentials, or available pUSD balance are not ready for the requested order, stop and report the blocker.
5. If the user already provided the complete order payload and explicit affirmative confirmation for that exact payload in the current conversation, submit it without asking unrelated follow-up questions. If not, show the exact payload and ask for confirmation before submitting.
6. Send exactly one request to `POST /v3/authorize-and-send/polymarket` and report the real API result. Never fabricate fills, order IDs, balances, or status.

Supported action:

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 516)May include surrounding context.

CLOB Open Orders — Authenticated Order State

Open orders require authenticated Polymarket CLOB credentials/client context. Use the authenticated client when available; never ask the user to paste a CLOB secret/passphrase into chat.

ts
const orders = await clobClient.getOpenOrders({ market, asset_id }, true)