
The $17M Arbitrary External Call Exploit: How Unchecked call() Targets Drained SwapNet and Aperture Finance
DeFi Security Research — Vulnerability Analysis It's the simplest vulnerability class in smart contracts, and it just caused $17 million in losses across four chains in a single day. On January 25, 2026, attackers exploited SwapNet ($13.4M) and Aperture Finance ($3.67M) using the same fundamental flaw: arbitrary external calls with user-controlled targets . Both protocols allowed users to specify call targets and calldata in swap functions — without validating that those targets were actually swap routers. The result? Attackers simply pointed the call() at token contracts and invoked transferFrom(victim, attacker, amount) , draining every token that users had approved to the protocol. Let's break down exactly how this happened, why existing checks failed, and how to build contracts that are immune to this pattern. The Vulnerability Pattern At its core, the arbitrary external call vulnerability is deceptively simple: // ❌ VULNERABLE: User controls both target and calldata function swap(
Continue reading on Dev.to
Opens in a new tab



