sherlock-audit / 2024-02-optimism-2024-judging

6 stars 4 forks source link

the `unlock` method in `delayedWETH` is callable by anyone #238

Closed sherlock-admin4 closed 7 months ago

sherlock-admin4 commented 7 months ago

the unlock method in delayedWETH is callable by anyone

Low/Info issue submitted by Shield

Summary

the unlock method in delayedWETH is callable by anyone

Vulnerability Detail

In the unlock method in delayedWETH even though they mention this in comments but there is a minor possibility that someone calls it directly and the off chain authotity misses it and if 1DELAY_SECONDS` pass then they can drain the contract

Impact

possibility of funds being drained by a unauthorized user

Code Snippet

https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/dispute/weth/DelayedWETH.sol#L57

Tool used

Manual Review

Recommendation

there should be a check that the msg.sender is a contract and implements the fault dispute game interface