T05 · Unauthorized Access and Privilege Escalation
- Location
templates/src/utils/utils.pull.log.ts:16- Finding
Unrestricted RPC URLs Allow Requests to Internal Network Services
- Content
View full analysis
u.trim()) .filter(Boolean); if (!list.length) { throw new Error('At least one RPC URL is required'); } return list; } function createProvider(url: string) { return new ethers.JsonRpcProvider(url, undefined, { batchMaxCount: 1 }); } ``` The RPC type accepts arbitrary strings: ```typescript rpc: string | string[]; ``` ### Technical Analysis The application passes user-configured RPC URLs directly to `ethers.JsonRpcProvider`. It does not validate the URL scheme, destination hostname, resolved IP address, port, or redirect behavior. This permits the process to send JSON-RPC requests to loopback, link-local, private-network, or otherwise privileged endpoints reachable from the Agent's execution environment. Support for custom EVM chains makes configurable RPC endpoints necessary, but unrestricted access to internal destinations exceeds a safe default privilege boundary. The request methods are constrained by the application to Ethereum JSON-RPC operations such as `eth_blockNumber` and `eth_getLogs`; this is not a fully arbitrary HTTP-request primitive. Nevertheless, it can interact with internal services, disclose their reachability through error differences, and potentially communicate with internal JSON-RPC-compatible services. ### Attack Path 1. An attacker supplies an RPC URL pointing to an internal destination, such as a loopback address, RFC1918 address, link-local address, or internal DNS name. 2. The Agent places that URL in `contract.ts` as instructed by the Skill. 3. The Agent run ...[truncated 929 chars]- Remediation
View remediation
