Closed code423n4 closed 1 year ago
https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/QuestFactory.sol#L210-L213
In the QuestFactory.sol contract, an attacker can monitor the mem pool and obtain the values of hash and signature_ which the other user has provided to the function
hash
signature_
210-213: function recoverSigner(bytes32 hash_, bytes memory signature_) public pure returns (address) { bytes32 messageDigest = keccak256(abi.encodePacked('\x19Ethereum Signed Message:\n32', hash_)); return ECDSAUpgradeable.recover(messageDigest, signature_); }
The simplest way to mitigate this is to use flashbots or some other means of submitting the values to recoverSigner call that skips the mempool.
recoverSigner
kirk-baird marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/QuestFactory.sol#L210-L213
Vulnerability details
In the QuestFactory.sol contract, an attacker can monitor the mem pool and obtain the values of
hash
andsignature_
which the other user has provided to the functionProof of Concept
https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/QuestFactory.sol#L210-L213
Recommended Mitigation Steps
The simplest way to mitigate this is to use flashbots or some other means of submitting the values to
recoverSigner
call that skips the mempool.