only owner is allowed to grant and revoke multisig wallet holder, with up to a total of 5 holders including owner itself. a transaction proposed by owner should gets approved by at least 3 people in order to execute the transaction, regardless of the total holder of such multisig wallet
if one of the holder should no longer be in such multisig wallet, owner can revoke it. this is expected and has no issue, however, i notice that the approval by such user is still counted even after getting revoked.
Likelihood:
assuming pending transaction (owner proposed but has yet to be executed) exist
a user (multisig holder) knows that he will gets revoked from this multisig, he can frontrun the owner revoke's action by approving the transaction, leaving this user's approval still exist/counted in this transaction approval
Impact:
based on the business logic, a minimum of 3 users should approve the proposed transaction in order to have it executed
a user who had previously approved the transaction and has been revoked will still counted in this constraint, allowing a non-signer approval also gets submitted and not getting removed.
attacker path:
owner has granted user1, user2, user3 and user4
owner propose a transaction
owner and user1 has approved this transaction
before the third confirmation is made, owner realize that user2 should not be here for some reason
owner decided to revoke user2 and invite user5
user2 knows it, he frontrun the owner's transaction by approving the existing proposed transaction
since user2 has submitted the confirmation right before he is getting rovoked, and the revoke functionaity does not check if such user has an active confirmation on a pending transaction, resulting an additional approval exist by a non-existing user
user5 saw the minimum confirmation has reached, he executes the transaction.
the transaction went successfully with a minimum of 3 approvals, even with the third confirmation is made by a revoked user
create a test file and paste the PoC above into the test file, and run the test.
consider having a variable that keep track of the signer approval, and remove the entire approval history when revoke action is called by the owner
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.