Submitted by rfa, also found by Omik
BribeVault.sol#L187
Malicious DEPOSITOR_ROLE can doing self transfer and manipulate b.amount
In case malicious DEPOSITOR_ROLE inputing WETH address and putting briber == address(this) in safeTransferFrom argument (which is self transfering). Therefore, it is posible to increase b.amount without any cost.
WETH token contract:
If the condition didnt pass (in this case msg.sender != src ), the transaction will treated like a transfer (doesnt need an allowance), Therefore its possible to do self transfer
I recommend to validate that bribe != Address(this)
Alex the Entreprenerd (judge) commented:
