Lack of signature replay protection in TimelockTimePool.sol withdraw function #178
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-60
🤖_60_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/contracts/team/TimelockTokenPool.sol#L168
https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/contracts/team/TimelockTokenPool.sol#L208
Vulnerability details
Lack of signature replay protection in TimelockTimePool.sol withdraw function
Line of code
Proof of concept
In
TimelockTokenPool.sol
,Line of code
Impact
there is lack of validation for signature replay,
then once the recipient sign a signature, anyone can replay the signature to trigger withdraw repeatedly
Line of code
And this will let the sharedVault recipient replay the amountToWithdraw several times,
and force the _recipient to pay the costToWithdraw several times to drain the fund
that remain static in the _recipient wallet
Recommendation
mark the hash as used and do not allow signature reuse.
Assessed type
Token-Transfer
The text was updated successfully, but these errors were encountered: