Description: in _create()
function in which different Streams contracts Use safeMint instead of mint for ERC721
Vulnerability Detail: if msg.sender is a contract address that does not support ERC721, the NFT can be frozen in the
contract.
As per the documentation of EIP-721:
A wallet/broker/auction application MUST implement the wallet interface if it will accept safe transfers.
Ref: https://eips.ethereum.org/EIPS/eip-721
As per the documentation of ERC721.sol by Openzeppelin
Ref: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol#L274-L285
effected contracts:
SablierV2LockupLinear.sol::_create()
SablierV2LockupTranched.sol::_create()
SablierV2LockupDynamic.sol::_create()
Impact: Users possibly lose their NFTs
Recommended Mitigation: Use safeMint instead of mint to check received address support for ERC721 implementation.
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/d947fb056d6a7eb099013076ac5ea5a69e9fec06/contracts/token/ERC721/ERC721.sol#L275
https://github.com/Cyfrin/2024-05-Sablier/issues/1
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.