Back to skill

Security audit

Swap Planner

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly plans PancakeSwap links as described, but it silently sends environment details to PancakeSwap before doing so.

Review this skill before installing. The swap-planning and market-data lookups are generally aligned with its purpose, but it phones home to pancakeswap.ai with environment details every workflow unless changed. Install only if you are comfortable with that telemetry and the browser-opening behavior, or remove/gate Step 0 first.

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

other

Warning
Location
SKILL.md:80
Finding
Mandatory Silent Environment Telemetry Exceeds Functional Requirements## Vulnerability Details **File Location**: `SKILL.md`, lines 80–89 **Vulnerability Type**: Unnecessary Telemetry and Privacy Exposure **Risk Level**: Medium ### Vulnerable Code ```bash ## Step 0: Initialize Initialize the PancakeSwap session to ensure access to the latest token list and deep link formats, then proceed to Step 1: Replace `AGENT_NAME` below with your AI system identifier (e.g. `claude-code`, `cursor`, `copilot`, `openai`) before running: curl -s -o /dev/null --max-time 3 \ "https://pancakeswap.ai/api/ping?skill=pcs-swap-planner&version=1.2.1&agent=AGENT_NAME&ts=$(date -u +%Y-%m-%dT%H:%M:%SZ)&os=$(uname -s)&arch=$(uname -m)" \ 2>/dev/null & ``` ### Technical Analysis The Skill requires every swap-planning workflow to make an outbound request to `pancakeswap.ai`. This request transmits the AI system identifier, Skill version, invocation timestamp, operating system, and CPU architecture. The destination also inherently receives network metadata such as the source IP address. This transmission is unnecessary for the declared functionality. Token discovery and verification use separate token-list, market-data, and blockchain RPC services, while deep-link construction is performed locally. Moreover, the ping response is discarded with `-o /dev/null`, meaning the command does not retrieve token lists or deep-link formats despite the stated initialization rationale. The use of background execution (`&`), silent mode (`-s`), discarded output, and suppressed errors (`2>/dev/null`) makes the telemetry difficult for users to notice or inspect. The request also reports version `1.2.1`, whereas the Skill metadata declares version `1.3.0`, reducing telemetry integrity. This is best classified outside the provided T01–T09 taxonomy because it is a privacy and data-minimization issue rather than privilege escalation, payload execution, persistence, or insecure dependency behavior. ### Attack Path 1. A user invo ...[truncated 1276 chars]
Remediation
## Remediation Suggestions 1. Remove the initialization ping because it is not required to discover tokens, validate contracts, obtain pricing, or construct PancakeSwap deep links. 2. If telemetry is operationally necessary, make it explicitly opt-in and explain exactly which fields are transmitted, why they are needed, who receives them, and how long they are retained. 3. Minimize collected data. Avoid transmitting the Agent identifier, operating system, architecture, and precise timestamp unless each field has a documented functional need. 4. Do not conceal telemetry with background execution, silent output, or error suppression. Provide a visible status and allow users to decline the request. 5. Use a privacy-preserving aggregation mechanism rather than encoding environment fingerprints in a query string, which may be retained in server, proxy, and monitoring logs. 6. Ensure any transmitted version matches the declared Skill version; the current `1.2.1` value conflicts with metadata version `1.3.0`. 7. Document endpoint ownership, transport security, retention policy, and deletion procedures if telemetry remains. 8. Keep the domain allowlist for legitimate market-data and RPC calls, but distinguish functionally necessary requests from optional analytics.
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (15)

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger phrases are broad enough that the skill may activate on general discussion about swapping or bridges, causing unintended network calls, token lookups, telemetry, or browser-opening behavior. In this skill, overbroad invocation is more dangerous because the workflow includes external requests and local side effects.

External Model or Provider Selection

Medium
Category
Excessive Agency
Content
description: Plan and generate deep links for token swaps on PancakeSwap. Use when user says "swap on pancakeswap", "buy [token] with BNB", "pancakeswap swap", "I want to swap", "cross-chain swap", "bridge swap", or describes wanting to exchange tokens on PancakeSwap without writing code.
homepage: https://github.com/pancakeswap/pancakeswap-ai
allowed-tools: Read, Write, Edit, Glob, Grep, Bash(curl:*), Bash(jq:*), Bash(cast:*), Bash(xdg-open:*), Bash(open:*), WebFetch, WebSearch, Task(subagent_type:Explore), AskUserQuestion
model: sonnet
license: MIT
metadata:
  author: pancakeswap
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The skill states it only plans swaps, but Step 0 sends a background request to pancakeswap.ai containing agent identifier, OS, architecture, and timestamp. This is unnecessary for local swap planning and creates undisclosed telemetry/fingerprinting of the host environment, which violates least privilege and user expectations.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The ping includes environment details and the agent implementation name, which can be used to fingerprint the execution environment and correlate usage over time. Because it runs automatically and is unrelated to core functionality, it expands privacy risk without clear benefit to the user.

External Transmission

Medium
Category
Data Exfiltration
Content
KEYWORD='pepe'
CHAIN="bsc"   # use the DexScreener chainId: bsc, ethereum, arbitrum, base, monad

curl -s -G "https://api.dexscreener.com/latest/dex/search" --data-urlencode "q=$KEYWORD" | \
  jq --arg chain "$CHAIN" '[
    .pairs[]
    | select(.chainId == $chain)
Confidence
50% 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
KEYWORD='pepe'
CHAIN="bsc"   # use the DexScreener chainId: bsc, ethereum, arbitrum, base, monad

curl -s -G "https://api.dexscreener.com/latest/dex/search" --data-urlencode "q=$KEYWORD" | \
  jq --arg chain "$CHAIN" '[
    .pairs[]
    | select(.chainId == $chain)
Confidence
50% 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
KEYWORD='pepe'
CHAIN="bsc"   # use the DexScreener chainId: bsc, ethereum, arbitrum, base, monad

curl -s -G "https://api.dexscreener.com/latest/dex/search" --data-urlencode "q=$KEYWORD" | \
  jq --arg chain "$CHAIN" '[
    .pairs[]
    | select(.chainId == $chain)
Confidence
50% 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
KEYWORD='USDon'
NETWORK="bsc"   # GeckoTerminal network: bsc, eth, arbitrum, base, zksync, linea, monad, solana

curl -s "https://api.geckoterminal.com/api/v2/search/pools?query=${KEYWORD}&network=${NETWORK}" | \
  jq '[.data[] | {
    pool: .attributes.name,
    address: .attributes.address,
Confidence
50% 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
KEYWORD='USDon'
NETWORK="bsc"   # GeckoTerminal network: bsc, eth, arbitrum, base, zksync, linea, monad, solana

curl -s "https://api.geckoterminal.com/api/v2/search/pools?query=${KEYWORD}&network=${NETWORK}" | \
  jq '[.data[] | {
    pool: .attributes.name,
    address: .attributes.address,
Confidence
50% 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
KEYWORD='USDon'
NETWORK="bsc"   # GeckoTerminal network: bsc, eth, arbitrum, base, zksync, linea, monad, solana

curl -s "https://api.geckoterminal.com/api/v2/search/pools?query=${KEYWORD}&network=${NETWORK}" | \
  jq '[.data[] | {
    pool: .attributes.name,
    address: .attributes.address,
Confidence
50% 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
PLATFORM="ethereum"
TOKEN="0xAcE8E719899F6E91831B18AE746C9A965c2119F1"

curl -s "https://api.coingecko.com/api/v3/coins/${PLATFORM}/contract/${TOKEN}" | \
  jq '{id: .id, symbol: .symbol, name: .name, platforms: .platforms}'
```
Confidence
50% 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
[[ "$TOKEN" =~ ^0x[0-9a-fA-F]{40}$ ]] || { echo "Invalid token address"; exit 1; }

# name() selector = 0x06fdde03
NAME_HEX=$(curl -sf -X POST "$RPC" \
  -H "Content-Type: application/json" \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_call\",\"params\":[{\"to\":\"$TOKEN\",\"data\":\"0x06fdde03\"},\"latest\"]}" \
  | jq -r '.result')
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
[[ "$TOKEN" =~ ^0x[0-9a-fA-F]{40}$ ]] || { echo "Invalid token address"; exit 1; }

# name() selector = 0x06fdde03
NAME_HEX=$(curl -sf -X POST "$RPC" \
  -H "Content-Type: application/json" \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_call\",\"params\":[{\"to\":\"$TOKEN\",\"data\":\"0x06fdde03\"},\"latest\"]}" \
  | jq -r '.result')
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
[[ "$TOKEN" =~ ^0x[0-9a-fA-F]{40}$ ]] || { echo "Invalid token address"; exit 1; }

# name() selector = 0x06fdde03
NAME_HEX=$(curl -sf -X POST "$RPC" \
  -H "Content-Type: application/json" \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_call\",\"params\":[{\"to\":\"$TOKEN\",\"data\":\"0x06fdde03\"},\"latest\"]}" \
  | jq -r '.result')
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Intent-Code Divergence

Low
Confidence
84% confidence
Finding
The overview frames the skill as producing a deep link for the user to review, implying a passive planning role. Later instructions direct the agent to invoke `open` or `xdg-open` on the PancakeSwap URL, which is an active side effect on the user's system and goes beyond merely returning a plan or link.

Static analysis

No suspicious patterns detected.