Back to skill

Security audit

Gekko Yield

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real-funds DeFi automation tool with disclosed purpose, but its auto-compound path can sign under-validated swap transactions and deposit more USDC than a user would reasonably expect.

Review this carefully before installing. Use only a dedicated hot wallet with limited funds, avoid running auto-compound until it validates Odos transaction payloads and deposits only reward proceeds, and prefer locked local execution over ad hoc `npx` commands. Treat previews as informational only because the scripts do not consistently require an explicit user confirmation before signing transactions.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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 (2)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/compound.ts:88
Finding

Unvalidated Remote Transaction Payload Is Signed and Broadcast

Content
View full analysis
{ const response = await rateLimitedFetch('https://api.odos.xyz/sor/assemble', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ userAddr: userAddress, pathId, simulate: false, }), }); if (!response.ok) return null; const data = await response.json() as OdosAssembleResponse; if (!data.transaction?.to || !data.transaction?.data) return null; return data; } ``` ```ts const assembled = await assembleOdosTransaction(quote.pathId, account.address); if (!assembled) { console.log(` ⚠️ Could not assemble transaction\n`); continue; } console.log(` Executing swap...`); const gasEstimate = BigInt(assembled.transaction.gas); const gasWithBuffer = gasEstimate + (gasEstimate * 50n / 100n); const nonce = await getFreshNonce(publicClient, account.address); try { const swapHash = await walletClient.sendTransaction({ to: assembled.transaction.to as Address, data: assembled.transaction.data as Hex, value: BigInt(assembled.transaction.value), gas: gasWithBuffer, nonce, }); const receipt = await waitForTransaction(publicClient, swapHash); ``` ### Technical Analysis The auto-compound operation obtains the destination address, calldata, native-token value, and gas estimate from the external Odos assembly API. The response is trusted after checking only that the `to` and `data` fields exist. The code does not verify that: - `transaction.to` equals the declared `ODOS_ROUTER`; - `transaction.value` is zero or otherwise expected and bounded; - the calldata invokes an approved Odos function; - the calldata spends only the intended reward to ...[truncated 2294 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/compound.ts:201
Finding

Auto-Compound Deposits the Wallet's Entire USDC Balance

Content
View full analysis
Remediation
View remediation
usdcBefore ? usdcAfter - usdcBefore : 0n; ``` 3. Approve and deposit only `compoundAmount`, not `usdcAfter`. 4. Track confirmed swap receipts and expected outputs. Abort the deposit stage when no supported reward swap succeeded or when the resulting balance increase is zero. 5. Display a transaction preview containing: - Reward tokens consumed; - Actual USDC balance increase; - Existing USDC excluded from compounding; - Approval amount; - Deposit amount and destination. 6. Require explicit user confirmation before depositing. For unattended automation, require a clearly documented flag or configuration option with a maximum per-run amount. 7. If depositing existing wallet USDC is desired, expose it only through an explicit option such as `--include-existing-usdc`, disabled by default. 8. Add tests covering wallets with pre-existing USDC, failed reward swaps, partial swaps, and unexpected balance changes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (98)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill description narrows user expectations to deposit/withdraw/status/report actions, but the documented behavior also includes reward-token swaps through Odos and auto-compounding. In a financial skill, undeclared integrations and side effects are dangerous because users may authorize actions with materially different risk, slippage, routing, and approval implications than advertised.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
92% confidence
Finding

The helper simulates and then submits arbitrary state-changing contract calls through the wallet client with no built-in confirmation, policy check, or transaction intent display. In the context of a DeFi skill that can move funds, this makes accidental or unintended on-chain actions materially more dangerous because any caller of this helper can trigger writes once key access is configured.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The approval flow sends ERC-20 approve transactions without an explicit end-user warning that token spending rights are being granted to a third-party contract. In DeFi, approvals are highly sensitive because a mistaken spender or excessive allowance can enable unauthorized token transfer beyond the immediate deposit operation.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · scripts/setup.ts (reported line 42)May include surrounding context.

ts
// Check existing config
  if (fs.existsSync(CONFIG_PATH)) {
    console.log('✅ Existing configuration found.\n');
    const overwrite = await ask(rl, 'Overwrite existing config? [y/N]: ');
    if (overwrite.toLowerCase() !== 'y') {
      console.log('\nSetup cancelled. Existing config preserved.');
      rl.close();

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The auto-compound section describes swapping WELL and MORPHO to USDC and depositing again, but it does not explicitly warn that this performs on-chain swaps, incurs gas, can realize slippage, and may move assets in ways the user did not intend. In a DeFi skill, missing consent and risk disclosure around token swaps materially increases the chance of unauthorized or misunderstood asset-changing actions by an agent.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The README instructs users to run TypeScript files via npx tsx without pinning the package version. npx can resolve and execute a package version that changes over time or, if not already installed locally as intended, fetch code at execution time, creating a supply-chain risk. In a skill that handles private keys and real fund movements, arbitrary code execution could directly expose wallet secrets or trigger unauthorized transactions.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The command uses npx tsx without an explicit version pin, so execution depends on whatever tsx version is locally resolved or fetched at runtime. That exposes users to upstream package compromise or unexpected behavior changes. Because this setup flow is for a wallet-managing yield skill, compromise at this point could capture credentials or alter destination contracts.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

Running npx tsx status.ts without pinning the package version introduces a supply-chain execution path outside the repository contents. A malicious or swapped package could run arbitrary code under the user's wallet-bearing environment. The risk is heightened because the skill explicitly works with real blockchain positions and environment-loaded private keys.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

This deposit command combines unpinned npx tsx execution with a workflow that moves real USDC. If tsx or a transitive dependency were compromised, the user could execute attacker-controlled code before or during a fund-moving action, potentially draining funds or redirecting approvals and transfers. The fund-management context makes this substantially more dangerous than in a non-financial utility.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The report-generation command still relies on unpinned npx tsx, which can execute non-deterministic third-party code. Even though this command is read-oriented, malicious code could still exfiltrate environment variables, wallet data, or alter local files. The presence of private-key-based configuration increases the sensitivity of any arbitrary code execution vector.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The setup command is documented with npx tsx but no exact version, leaving the toolchain mutable at execution time. A compromised package could modify wallet setup behavior, capture secrets, or persist malicious configuration. Since setup establishes trust for later fund operations, compromise here has outsized downstream impact.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

Although this status check may seem lower risk, npx tsx without version pinning still allows arbitrary code execution through package resolution. In this repository context, such code could inspect balances, read configuration, or exfiltrate secrets from the runtime environment. The issue is therefore a genuine supply-chain vulnerability rather than mere documentation style.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

This withdraw command can directly move funds, and it is invoked through unpinned npx tsx. If a malicious package version is executed, it could alter withdrawal targets, request extra approvals, or steal the private key, leading to immediate financial loss. The transaction-bearing context makes the vulnerability severe.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The formatted report command uses npx tsx without version pinning, so users may execute code that is not the reviewed version assumed by the repository. Even on non-transactional commands, a compromised package can harvest secrets or tamper with outputs. Because the skill stores wallet-related configuration and reads a private key from the environment, the exposure remains meaningful.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The JSON report command has the same unpinned npx tsx supply-chain risk as the other examples. Attackers compromising the package path could run arbitrary code, manipulate generated machine-readable output, or exfiltrate wallet-related data from the environment. The financial automation context increases the consequence of even seemingly read-only operations.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Auto-compounding involves swaps and re-deposits of reward tokens, yet the command is launched with unpinned npx tsx. That creates a high-risk supply-chain entry point where malicious code could redirect swaps, change token approvals, or drain assets during an active fund-management workflow. In a DeFi skill handling live funds, this is a serious vulnerability.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares executable behavior that needs environment-variable access and network connectivity, yet it does not declare any explicit tool scope or permissions boundary. In a funds-managing DeFi skill, this increases the chance of overbroad execution, unclear operator expectations, and unsafe access to secrets or external endpoints.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill uses superlative safety claims such as describing the vault as one of the safest places to earn yield on Base. In a financial context, unqualified safety language can create false trust, reduce scrutiny, and materially influence users to expose funds to protocol risk they may not understand.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill encourages users to deposit real funds and auto-compound, but it does not prominently warn about smart-contract, protocol, bridge, counterparty, liquidity, slippage, and market risks. In DeFi, omission of these risks can mislead users into treating the activity like a low-risk savings product and making unsafe funding decisions.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using npx tsx without pinning an exact package version allows retrieval of whatever version resolves at execution time, creating a supply-chain risk. Because this skill handles private keys and signs on-chain transactions, a malicious or compromised package version could directly exfiltrate secrets or alter transaction logic.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using npx tsx without pinning an exact package version allows retrieval of whatever version resolves at execution time, creating a supply-chain risk. Because this skill handles private keys and signs on-chain transactions, a malicious or compromised package version could directly exfiltrate secrets or alter transaction logic.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using npx tsx without pinning an exact package version allows retrieval of whatever version resolves at execution time, creating a supply-chain risk. Because this skill handles private keys and signs on-chain transactions, a malicious or compromised package version could directly exfiltrate secrets or alter transaction logic.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using npx tsx without pinning an exact package version allows retrieval of whatever version resolves at execution time, creating a supply-chain risk. Because this skill handles private keys and signs on-chain transactions, a malicious or compromised package version could directly exfiltrate secrets or alter transaction logic.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using npx tsx without pinning an exact package version allows retrieval of whatever version resolves at execution time, creating a supply-chain risk. Because this skill handles private keys and signs on-chain transactions, a malicious or compromised package version could directly exfiltrate secrets or alter transaction logic.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Using npx tsx without pinning an exact package version allows retrieval of whatever version resolves at execution time, creating a supply-chain risk. Because this skill handles private keys and signs on-chain transactions, a malicious or compromised package version could directly exfiltrate secrets or alter transaction logic.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access, suspicious.exposed_secret_literal

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/config.ts:224

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/setup.ts:56