Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

Users can front run the signature of the userOp, leading to some problems

Summary

Users can front run the signature of the userOp, leading to some problems

Vulnerability Details

When user want to call validateUserOp function by calling entrypoint .
This contract will validate user's parameter .

function _validateSignature(PackedUserOperation calldata userOp, bytes32 userOpHash)
internal
pure
returns (uint256 validationData)
{
bytes32 hash = MessageHashUtils.toEthSignedMessageHash(userOpHash);
ECDSA.recover(hash, userOp.signature);
return SIG_VALIDATION_SUCCESS;
}

This problem is that _validateSignature may be used in mempool, a malicious user can front-run this signature , to complete this tranaction before user's tranaction .

Impact

After this signature is used once by malicious user, this user might loss his fund .

Tools Used

Mannual Review , Foundry

Recommendations

Consider add more parameter (msg.sender) , to this calldata userOp

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.