Submitted by WatchPug
Swap.sol L200-L212
A call to an arbitrary contract with custom calldata is made in fillZrxQuote(), which means the contract can be an ERC20 token, and the calldata can be transferFrom a previously approved user.
The wallet balances (for the amount up to the allowance limit) of the tokens that users approved to the contract can be stolen.
Given:
The attacker can:
As a result, 1000 WETH will be stolen from Alice and sent to the attacker.
This PoC has been tested on a forking network.
Consider adding a whitelist for zrxTo addresses.
Shadowfiend (Tally) confirmed
