Back to skill

Security audit

NexusWeb3 Utility Infrastructure

Security checks for vulnerabilities and agentic risk

Overview

The skill is only documentation, but it presents itself as read-only while giving transaction examples that can spend funds, approve tokens, lock assets, and write persistent on-chain data.

Treat this as a transaction-capable blockchain reference, not a read-only query aid. Do not let an agent use it to prepare wallet signatures unless each transaction is explicitly confirmed with the Base chain ID, contract address, decoded function, token allowance, ETH value, fees, lock duration, recipient, and expected state changes. Never store private keys, seed phrases, or API secrets in the documented on-chain storage.

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:3
Finding

Misleading Read-Only Classification Includes Financial Write Operations

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:3-11, 42-61, 93-98, 115-127, 149-170, 185-207, 221-238, 258-269, 290-309, 345-353, 391; README.md:3-5, 24-26
Vulnerability Type: Insecure and misleading skill configuration
Risk Level: Medium

The skill repeatedly identifies itself as a read-only API reference, but its instructions include numerous state-changing and financially consequential operations.

Complete Code Snippets

The declared read-only scope appears in SKILL.md:3-11:

markdown
description: Read-only API reference for NexusWeb3 utility protocols 11-20 on Base mainnet — scheduling, oracle, voting, storage, messaging, staking, whitelist, auctions, revenue splitting, and analytics.
version: 1.1.0
homepage: https://github.com/nexusweb3dev/nexusweb3-protocols
user-invocable: true
---

# NexusWeb3 Utility Layer — API Reference

Read-only reference for 10 utility protocols on Base mainnet. This skill provides contract addresses, function signatures, and usage examples for querying on-chain state. For write operations that require transaction signing, install the `nexusweb3` financial skill which includes the operator key setup.

However, SKILL.md:42-61 documents payable scheduling and cancellation transactions:

solidity
AgentScheduler.scheduleTask{value: schedulingFee + keeperReward}(
    abi.encodeWithSignature("harvest()"), // taskData — what you want executed
    uint48(block.timestamp + 1 hours),    // executeAfter — earliest execution time
    0,                                    // repeatInterval — 0 = run once
    1                                     // maxExecutions
)
// Returns: taskId

uint256 totalDeposit = schedulingFee + (keeperReward * 30);
AgentScheduler.scheduleTask{value: totalDeposit}(
    abi.encodeWithSignature("rebalance()"),
    uint48(block.timestamp + 1 days),
    uint48(1 days),   // repeatInterval — must be >= 5 minutes
    30         
...[truncated 5186 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove all state-changing examples from this package and retain only view or pure queries if it is intended to remain read-only.
  2. Alternatively, rename and reclassify the skill as transaction-capable, and clearly separate read-only and write-operation sections.
  3. Require explicit, operation-specific user confirmation before invoking any wallet or signing tool. The confirmation should show:
    • Network and chain ID.
    • Contract and token addresses.
    • Function name and decoded parameters.
    • ETH value and estimated gas.
    • Token amount and resulting allowance.
    • Lock duration, fee, and irreversible effects.
  4. Verify Base Mainnet chain ID 8453, deployed bytecode, and expected contract identity before preparing a transaction.
  5. Query current on-chain fees and balances rather than relying on examples or assumptions.
  6. Use exact, minimal ERC-20 allowances and revoke them after use where practical. Avoid unlimited approvals.
  7. Simulate every write transaction and present decoded state and balance changes before requesting a signature.
  8. Validate all recipient, owner, feed, poll, task, auction, split, and stake identifiers.
  9. Add prominent warnings around token locks, immutable messages, persistent storage, auction bids, and non-refundable fees.
  10. Include verifiable links or checked-in artifacts for contract source code, deployment metadata, and claimed security audits.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill is marketed as a read-only API reference, but it provides extensive instructions for state-changing, fee-bearing, and asset-affecting on-chain operations. This mismatch can mislead users or calling agents into treating the skill as safe for passive querying while actually exposing them to transaction signing, irreversible writes, and fund movement risks.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The document explicitly says write operations belong in a different skill, then immediately includes write instructions across nearly every protocol section. That contradiction undermines safety boundaries between skills and can cause an agent or user to invoke dangerous operations from a skill they were told was read-only.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The phrase 'Owners control who can read private keys' normalizes storing private keys in on-chain storage, which is fundamentally unsafe because blockchain data is not an appropriate place for secrets. Even if access controls exist at the contract level, on-chain storage is broadly observable and should never be presented as suitable for secret material.

Content

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

md
## Protocol 14 — AgentStorage (Persistent On-Chain Key-Value Store)

Namespaced, access-controlled key-value storage for AI agents. Values survive across sessions. Owners control who can read private keys. Deleting a key returns 50% of the write fee.

**Contract:** `0x29483A116B8D252Dc8bb1Ee057f650da305AA8b7`

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The markdown repeatedly describes actions that create tasks, move tokens, lock assets, send messages, place bids, and update persistent state without strong up-front warnings about transaction signing, permanence, refunds, approvals, and potential loss. In an agent-skill context, weak safety framing increases the chance of unreviewed execution of irreversible or fund-affecting calls.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

// Returns: taskId

text

**Schedule a recurring task (every 24 hours, 30 times):**
```solidity
uint256 totalDeposit = schedulingFee + (keeperReward * 30);
AgentScheduler.scheduleTask{value: totalDeposit}(