Block: 5

Timestamp: 12:50:27

AuditProfile

Security blog

Security Snippets: #5

Here is a simple buy High severy bug that was found in Taiko, a based rollup which makes Ethereum cheaper while maintaining its properties. Take a look at the next code:

    function withdraw(address _to, bytes memory _sig) external {
        if (_to == address(0)) revert INVALID_PARAM();
        bytes32 hash = keccak256(abi.encodePacked("Withdraw unlocked Taiko token to: ", _to));
        address recipient = ECDSA.recover(hash, _sig);
        _withdraw(recipient, _to);
    }

In the TimelockTokenPool.sol contracts, users can provide a signature to allow someone else to withdraw all their withdrawable tokens on their behalf using their signature.

As seen from above, the signature provided does not include a nonce and this can lead to signature replay attacks. Due to the lack of a nonce, withdraw() can be called multiple times with the same signature. Therefore, if a user provides a signature to withdraw all his withdrawable tokens at one particular time, an attacker can repeatedly call withdraw() with the same signature to withdraw more tokens than the user originally intended.

Did you know that signature vulnerabilities are one of the most popular in smart contracts? If you have such system it's better to make a research on that bug and list all possible problems.

Here is a full report:

Link: https://code4rena.com/reports/2024-03-taiko#h-05-signatures-can-be-replayed-in-withdraw-to-withdraw-more-tokens-than-the-user-originally-intended

#signature

#withdraw

Connent with me:

Регистрация прошла успешно! Спасибо за внимание!

loader