Back to skill

Security audit

api3-data-feed-purchase

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned for buying API3 data feed subscriptions, but it handles wallet secrets and live blockchain spending with weak safeguards.

Review carefully before installing. Use only a dedicated low-balance wallet, do not store a valuable recovery phrase in the skill directory, inspect transaction details independently, and avoid running the read-data-feed step unless the proxy address is strictly validated as a hex Ethereum address.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:185
Finding

Shell Command Injection Through Weak Proxy Address Validation

Content
View full analysis
" ``` ``` ### Technical Analysis `PROXY_ADDRESS` is supplied by the user, but the Skill only verifies that it starts with `0x` and contains exactly 42 characters. These checks do not ensure that the remaining 40 characters are hexadecimal digits. The value is then substituted directly into an unquoted command string. Because the command already uses shell syntax (`&&`), a crafted value containing shell metacharacters, command substitution, separators, or redirection operators may be interpreted as command syntax rather than as a single address argument. The TypeScript script also does not independently validate the address with `ethers.isAddress()` before passing it to the contract factory: ```typescript const proxy = Api3ReaderProxyV1__factory.connect(proxyAddress, provider); ``` Validation in documentation alone is therefore the only boundary protecting this command. ### Attack Path 1. The Skill asks the user to provide a Reader Proxy address. 2. A malicious or compromised user supplies a 42-character string beginning with `0x` that contains shell control syntax. 3. The documented prefix-and-length checks accept the value because they do not enforce hexadecimal content. 4. The Agent substitutes the value into the unquoted `exec ...[truncated 823 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:55
Finding

Mandatory Non-Reproducible Dependency Installation

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/quote.ts:1
Finding

Quote Operation Unnecessarily Loads Wallet Secrets From .env

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says the skill purchases Api3 data feed subscriptions from market.api3.org. However, the code contains no purchasing, account, payment, transaction, or market.api3.org interaction. Instead, it accepts a feed name from the command line, finds matching dAPI metadata, derives data feed IDs, requests public data from signed-api.api3.org, decodes int256 values with ethers, and prints results. This is a materially different primary purpose and resource access pattern than the declared description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says the skill purchases Api3 data feed subscriptions from market.api3.org. However, the provided code only imports chain data from the API3 contracts package, maps over the supported chains, and prints their id/name/alias to stdout. There is no purchasing logic, no network interaction with market.api3.org, no transaction creation, and no subscription management. This is a material mismatch in primary purpose, not just an implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says the skill purchases Api3 data feed subscriptions from market.api3.org. However, the provided code only reads from the imported dAPI list, filters for active entries, and logs available dAPI names. There is no code for authentication, marketplace access, purchase initiation, payment, subscription management, or network interaction with market.api3.org. This is a materially different primary purpose, so it is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose says the skill purchases Api3 data feed subscriptions. However, the provided code only calculates/prepares a subscription quote and outputs details to the console. There is no transaction submission, payment execution, or call shown that completes a purchase. While preparing subscription data may support a purchase flow, the primary behavior of this code chunk is quoting, not buying. Therefore the description materially overstates what this code actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose says the skill purchases API3 data feed subscriptions from market.api3.org, but the provided code does not perform any purchasing, subscription management, marketplace interaction, authentication, or transaction submission. Instead, it is a read-only script that connects to an on-chain API3 reader proxy and retrieves a feed value and timestamp, then prints them. This is a materially different primary purpose, so it is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
---

# Rules
- **NEVER** read .env files or ask for secrets such as WALLET_MNEMONIC.
- **NEVER** read, list, or search inside `node_modules/`, `pnpm-lock.yaml`, or `pnpm-workspace.yaml`,they are not needed for this skill nor relevant to the user.
- **ALWAYS** use the `exec` tool to run commands. Never use Bash or shell directly.
- **ALWAYS** run scripts from the skill's directory, referenced as `{baseDir}` (the directory named by the `name` field at the top of this file). Prefix every command with `cd {baseDir} &&` to ensure it runs from the correct directory.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Run `explore-data-feeds.ts`, which fetches each provider's Signed API data and decodes the live value for this feed directly:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Run `explore-data-feeds.ts`, which fetches each provider's Signed API data and decodes the live value for this feed directly:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README instructs users to provide a wallet mnemonic and run a script that executes a blockchain purchase transaction, but it does not warn about secure secret handling, transaction review, or the risk of spending real funds. In a skill that directly interacts with on-chain purchases, this omission increases the chance of credential exposure or unintended financial loss by users following the documentation verbatim.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding

The skill invokes package installation, network access, and uses an environment-backed wallet mnemonic, but it does not declare any explicit tool scope or allowed-tools boundary. That increases the chance an agent runtime will grant broader capabilities than users expect, especially for a skill that can ultimately trigger a signed blockchain transaction.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill first forbids reading .env files or asking for the mnemonic, then later instructs the operator to rely on a .env-based WALLET_MNEMONIC for transaction signing. Contradictory secret-handling guidance is dangerous because it can cause agents or users to bypass safeguards around highly sensitive wallet material, especially in a flow that authorizes on-chain spending.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Directing the user to place a wallet mnemonic in a local .env file conflicts with the earlier prohibition and normal secret-handling practices. A plaintext mnemonic in the skill root materially raises the risk of credential disclosure through logs, filesystem inspection, accidental commits, or other tools running in the same workspace; compromise would allow theft of blockchain funds.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill operationalizes a plaintext mnemonic without an adequate user-facing warning about the severity of wallet-secret exposure. Because this mnemonic is used to sign a live purchase transaction, compromise of the secret enables unauthorized transactions and potential irreversible fund loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The code reads WALLET_MNEMONIC from the environment, which is a highly sensitive credential. Although it throws an error when unset, there is no accompanying warning, comment, or user-facing disclosure about handling wallet secrets or the security implications of using the mnemonic in this script.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script sends an on-chain purchase transaction with ETH immediately after computing parameters, without any interactive confirmation, dry-run safeguard, or explicit final warning to the operator. In a skill whose purpose is to purchase subscriptions from a live market contract, this increases the risk of unintended fund expenditure if inputs, environment, chain selection, or upstream data are wrong or manipulated.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says this skill purchases Api3 data feed subscriptions from market.api3.org, which implies a transaction or subscription-purchase workflow. This script instead takes a feed name, enumerates providers, derives feed IDs, fetches public signed API data, and prints values and metadata; it performs no purchase action and does not interact with market.api3.org.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

The dependency uses a caret range, which permits automatic installation of newer compatible versions rather than a single fixed release. This creates a software supply-chain risk: a compromised upstream package, bad publish, or breaking semver-compliant update could alter the runtime environment without an explicit review, which is relevant in a blockchain purchase skill that may handle credentials and transactions.

Content

Scanner excerpt · package.json (reported line 8)May include surrounding context.

json
"type": "module",
  "dependencies": {
    "@api3/dapi-management": "4.32.0",
    "@openzeppelin/merkle-tree": "^1.0.8",
    "dotenv": "^17.4.2",
    "ethers": "^6.16.0"
  }

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

The dotenv package is specified with a caret range, allowing npm to resolve later versions automatically. Even for a common utility library, this introduces avoidable supply-chain exposure and unpredictability, especially in a skill likely to load sensitive environment variables used for API access or signing transactions.

Content

Scanner excerpt · package.json (reported line 9)May include surrounding context.

json
"dependencies": {
    "@api3/dapi-management": "4.32.0",
    "@openzeppelin/merkle-tree": "^1.0.8",
    "dotenv": "^17.4.2",
    "ethers": "^6.16.0"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The ethers dependency is not fully pinned because the caret allows newer minor/patch releases to be installed. In a blockchain-focused skill, changes in a wallet/transaction library can have outsized impact on transaction construction, signing behavior, or error handling, making supply-chain and reproducibility concerns more significant than in a non-sensitive utility.

Content

Scanner excerpt · package.json (reported line 10)May include surrounding context.

json
"@api3/dapi-management": "4.32.0",
    "@openzeppelin/merkle-tree": "^1.0.8",
    "dotenv": "^17.4.2",
    "ethers": "^6.16.0"
  }
}

Static analysis

No suspicious patterns detected.