Closed c4-submissions closed 12 months ago
ydspa marked the issue as sufficient quality report
ydspa marked the issue as primary issue
The intended usecase for the off-chain validator is sign in with ethereum which requires an address, chainId, and nonce to be part of the message. https://docs.login.xyz/general-information/siwe-overview/eip-4361.
When using SIWE for a website off-chain, the website gives a message and retains the hash of that message for validation. We are unable to change the message to add other arbitrary data to it as that would change the hash and invalidate the signature.
arr00 (sponsor) disputed
gzeon-c4 marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-10-party/blob/b23c65d62a20921c709582b0b76b387f2bb9ebb5/contracts/signature-validators/OffChainSignatureValidator.sol#L28
Vulnerability details
Impact
Offchain signature can be improved
Proof of Concept
This issue intends to combine a few issues,
relevant line of code
an outdated signature can be used to bypass the validation without generating new signature
suppose
signerVotingPowerBps is 1000
totalVotingPower is 500
thresholdBps is 3
1000 / 500 >= 3 is false
but in totalVotingPower changed and reduced to 200
1000 / 200 >= 3 is true, and signature validation is passed
Tools Used
Manual Review
Recommended Mitigation Steps
add nonce to avoid signature reuse
add signature expiration to make sure signature have expiration date
Assessed type
Invalid Validation