T09 · Insecure Skill Coding Practices
- Location
SKILL.md:52- Finding
Unverified Dynamic Destination for Irreversible Cryptocurrency Payments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:52-59,SKILL.md:85-89,SKILL.md:103, andSKILL.md:139
Vulnerability Type: Unverified external transaction parameters and smart-contract destination
Risk Level: HighVulnerable Code
text GET https://spawn.fund/api/feejson { "fee": "0.004", "feeWei": "4000000000000000" }text Call `applyToIncubator(string ideaURI, string ideaHash)` on the SpawnIncubator contract with the entry fee attached. - `ideaURI`: URL or IPFS hash pointing to your proposal JSON - `ideaHash`: SHA-256 hash of the proposal content (for integrity verification) - `msg.value`: At least the current entry fee (check via API)text - Your entry fee stays in the treasury (non-refundable)text Contract addresses are available via `GET /api/stats`.Technical Analysis
The Skill directs an agent or user to obtain both the required payment amount and the smart-contract address from the same external service,
spawn.fund. It does not pin a canonical contract address, require validation of deployed runtime bytecode, specify an expected code hash, or require confirmation through an independent trusted source.Consequently, HTTPS is the only documented trust control. HTTPS protects transport under normal conditions but does not establish that the address returned by the service is the intended audited contract. Compromise of the domain, DNS, TLS termination infrastructure, hosting account, API service, or its administrative controls could allow an attacker to replace the returned fee and contract address.
The instruction to attach at least the API-provided fee further lacks a documented upper bound. A manipulated response could therefore specify an unexpectedly large payment. Because the entry fee is explicitly non-refundable and blockchain transfers are generally irreversible, incorrect transaction parameters can cause perman ...[truncated 1613 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the canonical Base chain ID and all expected production contract addresses directly in the reviewed Skill.
- Publish expected deployed runtime bytecode hashes and require an exact on-chain bytecode comparison before any transaction is prepared.
- Verify each address against an independent trusted source, such as a verified block-explorer entry or a separately maintained signed release manifest.
- Cryptographically sign address and fee metadata, and verify the signature against a public key pinned in the Skill.
- Define a strict maximum application fee. Abort if the API response is malformed, uses the wrong chain, exceeds the limit, or differs materially from independently retrieved data.
- Simulate the transaction before submission and verify the chain ID, recipient, function selector, decoded arguments, transferred value, and expected state changes.
- Require explicit human confirmation for every value-bearing transaction. The confirmation should display the full destination address, network, exact amount, and decoded contract call.
- Document the contracts' verified source code, proxy or upgradeability status, owner and administrator privileges, and emergency controls.
- Do not grant token allowances or broad wallet permissions unless they are strictly necessary, bounded, and separately reviewed.
