Submitted by WatchPug, also found by danb, Dravee, Alex the Entreprenerd, gzeon, IllIllI, jayjonah8, kenzo, pauliax, cmichel, csanuragjain, and z3s
The current design/implementation allows the DEFAULT_ADMIN_ROLE of BribeVault to steal funds from any address that approved this contract up to allowance:
As a DEFAULT_ADMIN_ROLE, the attack is simply do the following steps:
This can be effectively used as a backdoor/attack vector for a malicious/compromised wallet with DEFAULT_ADMIN_ROLE of BribeVault to steal all the tokens from users wallets for these users who have approved BribeVault.
BribeVault.sol#L164-L187
BribeVault.sol#L80-L88
Given:
A malicious/compromised DEFAULT_ADMIN_ROLE of BribeVault can do the following to steal tokens from users wallets.
As a result, the 100e8 WBTC belongs Alice is now stolen by the Hacker.
The steps above can be repeated for all tokens and users, effectively stealing all the token balances from all the wallets that approved BribeVault up to the allowance limit, which usually is unlimited.
Alex the Entreprenerd (judge) decreased severity to Medium and commented:
Alex the Entreprenerd (judge) commented:
