T09 · Insecure Skill Coding Practices
- Location
SKILL.md:118- Finding
Unverified Server-Provided EIP-7702 Delegation and Signing Data
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 118–133
Vulnerability Type: Unverified security-critical wallet authorization data
Risk Level: Highmarkdown Response contains `typedData` (EIP-712 for sweep) and `eip7702` (delegation parameters). ## Step 4: User Signs Messages The user must sign: 1. **EIP-7702 delegation authorization** - Delegates their EOA to ZeroDust contract 2. **EIP-7702 revoke authorization** - Pre-signed revocation (executed after sweep) 3. **EIP-712 sweep intent** - Authorizes the specific sweep parameters ## Step 5: Submit Sweep ```bash curl -X POST https://zerodust-backend-production.up.railway.app/sweep \Technical Analysis
The Skill instructs the Agent to obtain EIP-712 typed data and EIP-7702 delegation parameters from a remote service and ask the user to sign them. It does not require the Agent or wallet to independently verify the delegate contract address, chain ID, nonce, destination address, transferred amount, fee ceiling, expiration, or other authorization fields against the accepted quote.
An EIP-7702 authorization delegates executable behavior for an externally owned account. Consequently, the delegation target and associated signing data are security-critical. Reliance on opaque, dynamically supplied data creates a strong trust dependency on the availability, integrity, and correct operation of the remote backend.
The pre-signed revocation does not fully mitigate this exposure. Its successful execution is entrusted to the same service, and revocation after execution cannot reverse a transfer already authorized or completed.
Attack Path
- An attacker compromises the ZeroDust backend, its deployment account, DNS path, or another component capable of changing the authorization response.
- The attacker modifies the returned EIP-7702 delegate or EIP-712 fields, such as the destination, amount, chain, fee, expiry, or authorized contract.
...[truncated 1294 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the audited delegation contract address separately for every supported chain and reject any server response containing a different address.
- Decode the complete EIP-7702 and EIP-712 payload locally before requesting a signature.
- Validate the chain ID, delegate, nonce, destination, source address, asset, exact maximum amount, maximum total fee, quote identifier, and expiration against values explicitly approved by the user.
- Present all decoded fields in human-readable form and require explicit confirmation immediately before signing.
- Bind the sweep intent cryptographically to the accepted quote and reject any authorization response that differs from it.
- Enforce short expirations, one-time nonces, replay protection, and strict domain separation.
- Document an independent, user-controlled revocation procedure that does not rely on the sweep backend.
- Publish verified contract source code, audit reports, deployment addresses, and upgrade-control information for every supported chain.
- Require wallets to show clear warnings and decoded authorization details rather than requesting blind signatures.
- Independently verify completion, destination receipt, and delegation revocation through trusted chain RPC providers.
