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

0 stars 0 forks source link

`LensBaseERC721.sol` does not implement `_safeMint()` and the case where `_safeMint()` should be used rather than `_mint()` wherever possible is missed by bot. #134

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/LensHub.sol#L89-L102

Vulnerability details

Impact

Users possibly lose their NFTs

Proof of Concept

Tools Used

Manual Review

Recommended Mitigation Steps

  1. Implement _safeMint() in LensBaseERC721.sol : References
  2. Use _safeMint instead of _mint to check received address support for ERC721 implementation.

Assessed type

ERC721

c4-pre-sort commented 1 year ago

141345 marked the issue as duplicate of #17

c4-pre-sort commented 1 year ago

141345 marked the issue as not a duplicate

c4-pre-sort commented 1 year ago

141345 marked the issue as primary issue

c4-sponsor commented 1 year ago

donosonaumczuk marked the issue as disagree with severity

donosonaumczuk commented 1 year ago

We were aware of this and we are considering it. We think this should be QA/Low.

Picodes commented 1 year ago

Downgrading to Low as there is already a whitelist, and using SafeMint is in my opinion more an additional safety check that a security vulnerability

c4-judge commented 1 year ago

Picodes changed the severity to QA (Quality Assurance)

c4-judge commented 1 year ago

Picodes marked the issue as grade-c