code-423n4 / 2023-07-lens-findings

0 stars 0 forks source link

Signature Malleability in `MetaTxLib.sol` #132

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

Lines of code

https://github.com/code-423n4/2023-07-lens/blob/cdef6ebc6266c44c7068bc1c4c04e12bf0d67ead/contracts/libraries/MetaTxLib.sol#L469-L483

Vulnerability details

Impact

Replay attacks are possible thanks to signature malleability.

Proof of Concept

Tools Used

Manual review

Recommended Mitigation Steps

To address this issue, OpenZeppelin has taken measures to handle malleable signatures. You can find more information on how they tackled this problem at this GitHub link: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol#L125.

Assessed type

Access Control

c4-pre-sort commented 1 year ago

141345 marked the issue as duplicate of #52

Picodes commented 1 year ago

nonce is incremented to prevent replay attacks

c4-judge commented 1 year ago

Picodes marked the issue as unsatisfactory: Invalid