156 matches found
Use safeTransferFrom instead of transferFrom for ERC721 transfers
Lines of code Vulnerability details Impact In the contract VRFNFTRandomDraw.sol every transfer of ERC721 are done with the transferFrom instead of the recommended safeTransferFrom. This transferFrom does not check whether the receiver is capable of proper handling of NFTs. Proof of Concept If the...
winnerClaimNFT() does not check if recipient can receive ERC721
Lines of code Vulnerability details Impact In src\VRFNFTRandomDraw.sol winnerClaimNFT, you should use safeTransferFrom to protect against the case that the recipient cannot receive the ERC721 tokens, and thus will lose the tokens. This is more-so the case when we expect that normal users will be...
Functions of Trading contract can be reentered by Position.sol#mint
Lines of code Vulnerability details Impact Both the contracts of Position and Trading may not work correctly. Proof of Concept The Position.solmint calls safeMint will trigger a checkOnERC721Received callback, which can be used to reenter. Crackers can use this vulnerability to attack the protoco...
The transferFrom() method is used instead of safeTransferFrom(), which I assume is a gas-saving measure. I however argue that this isn’t recommended because:
Lines of code Vulnerability details Vulnerability Detail OpenZeppelin’s documentation discourages the use of transferFrom; use safeTransferFrom whenever possible The recipient could have logic in the startDraw, fwinnerClaimNFT, lastResortTimelockOwnerClaimNFT, function src/VRFNFTRandomDraw.sol-18...
ERC20 can be mistakenly used instead of ERC721
Lines of code Vulnerability details Impact // Attempt to transfer token into this address try IERC721EnumerableUpgradeablesettings.token.transferFrom // @audit could use ERC20 here msg.sender, addressthis, settings.tokenId catch revert TOKENNEEDSTOBEAPPROVEDTOCONTRACT; Both ERC20 and ERC721 has t...
The owner can swap the proxy implementation with a malicious one
Lines of code Vulnerability details The owner of VRFNFTRandomDrawFactory.sol could swap the current implementation with a malicious one at any moment, without a waiting period. Impact The worse case scenario is one in which the private key of the contract owner gets stolen. In this case the owner...
Raffle is fair only if tokenRange is a power of 2.
Lines of code Vulnerability details Impact Based on the contract logic, the raffle works by sampling a value $ x \in \mathbbZ | 0 \leq x \lt 2^256 $ aka uint256 from a uniform distribution provided by Chainlink VRF, then applying modulo tokenRange, generating a new value $ y \in \mathbbZ | 0 \leq...
Compromised admin can instantly take all NFTs held in NToken contracts
Lines of code Vulnerability details Description executeAirdrop is a function admin may call in order to collect airdrops for NFTs held in ParaSpace's nToken contract. function executeAirdrop address airdropContract, bytes calldata airdropParams external override onlyPoolAdmin require...
Missing ReEntrancy Guard to executeAcceptBidWithCredit function
Lines of code Vulnerability details Impact if the mint was initiated by a contract, then the contract is checked for its ability to receive ERC721 tokens. Without reentrancy guard, onERC721Received will allow an attacker controlled contract to call the mint again, which may not be desirable to so...
Oracle will become invalid much faster than intended on non-mainnet chains
Lines of code Vulnerability details Description NFTFloorOracle is in charge of answering price queries for ERC721 assets. EXPIRATIONPERIOD constant is the max amount of blocks allowed to have passed for the reading to be considered up to date: uint256 diffBlock = currentBlock - priceInfo.updatedA...
MintableIncentivizedERC721 and NToken do not comply with ERC721, breaking composability
Lines of code Vulnerability details Description MintableIncentivizedERC721 implements supportsInterface as below: / @dev See IERC165-supportsInterface. / function supportsInterfacebytes4 interfaceId external view virtual overrideIERC165 returns bool return interfaceId ==...
MintableIncentivizedERC721 incorrectly implements safe transfers
Lines of code Vulnerability details Impact MintableIncentivizedERC721 incorrectly implements safeTransfer and safeTransferFrom by simply replicating the unsafe transfer/transferFrom function. Raising as medium because as a consequence of this, these ERC721 tokens may end up locked in contracts th...
No Revert on Failure, an order can be execute successfully by disguising them as NFTs.
Lines of code Vulnerability details Impact ERC20 tokens don't throw a error when failed in transfer. A malicious user can pretend to be sending an ERC721 token while it is something else. Orders are getting executed inside LooksRareProxy.sol, an attacker as a maker can make an BasicOrder that has...
Users could accidentally burn() and lose fund
Lines of code Vulnerability details Impact If users accidentally burn the token, the fund will be lost. There does not seem any reason for the users to call the public burn function, only by mistake calling the method to lose self fund. Proof of Concept // contracts/enforcer/HolographERC721.sol...
MED - Incorrect implementation of ERC721 may have bad consequences for receiver
Lines of code Vulnerability details Description HolographERC721.sol is an enforcer contract that fully implements ERC721. In its safeTransferFromFunction there is the following code: if isContractto require ERC165to.supportsInterfaceERC165.supportsInterface.selector &&...
Reentrancy can increase allowance can be used to take more funds than expected
Lines of code Vulnerability details Reentrancy can increase allowance can be used to take more funds than expected In the same way as the typical front run of ERC20 approve/transferFrom, you would be able to take money when calling maliciousERC20.beforeApprove hook, this would realize a...
MED: leak of value when interacting with an ERC721 enforcer contract
Lines of code Vulnerability details Description HolographERC721.sol is an enforcer of the ERC721 standard. In its fallback function, it calls the actual implementation in order to handle additional logic. If Holographer is called with no calldata and some msg.value, the call will reach the receiv...
Upgraded Q -> M from 207 [1666364300864]
Judge has assessed an item in Issue 207 as Medium risk. The relevant finding follows: L-03 Use safeTransferFrom for ERC721 tokens Description As OpenZeppelin recommends, the transferFrom function should not be used for transferring ERC721 NFT tokens and instead the safeTransferFrom function shoul...
Upgraded Q -> M from 889 [1666366016998]
Judge has assessed an item in Issue 889 as Medium risk. The relevant finding follows: L-05 safeTransferFrom of VoteEscrowCore does not fully comply ERC721 standard Per , safeTransferFrom needs to throw if the receiver is a contract that does not have the onERC721Received function that returns...
Upgraded Q -> M from 400 [1666366553858]
Judge has assessed an item in Issue 400 as Medium risk. The relevant finding follows: Use safeTransferFrom instead of transferFrom transferFrom can be replaced with safeTransferFrom as it makes sure that the receiver can handle ERC721 tokens and prevents it from being stuck in the contracts Refer...