Submitted by mojito_auditor, also found by n1punp
The flash loan feature in USD0s flashLoan() function allows the caller to specify the receiver address. USD0 is then minted to this address and burnt from this address plus a fee after the callback. Since there is a fee in each flash loan, an attacker can abuse this to drain the balance of the receiver because the receiver can be specified by the caller without validation.
The allowance checked that receiver approved to address(this) but not check if receiver approved to msg.sender
Consider changing the allowance check to be the allowance that the receiver gave to the caller instead of address(this).
0xRektora (Tapioca) confirmed
