You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
Approved users with approvedForAll cannot act over lsNFT
Summary
NFT approved users with setApprovalForAll cannot act as a single approved user.
Vulnerability Detail
NFT can be approved in 2 ways, by approve and by setApprovalForAll. _requireOnlyApprovedOrOwnerOf should allow approved users to call privilege functions of lsNFT, but since NFT can only have one approved user with approve and multiple with setApprovalForAll, if the caller is approved with setApprovalForAll, he cannot act over NFT because the setApprovalForAll check is missing.
0xSmartContract
added
Medium
A Medium severity issue.
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
and removed
Excluded
Excluded by the judge without consulting the protocol or the senior
labels
Jul 27, 2024
sherlock-admin4
changed the title
Soft Mint Lizard - Approved users with approvedForAll cannot act over lsNFT
scammed - Approved users with approvedForAll cannot act over lsNFT
Jul 29, 2024
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
scammed
Medium
Approved users with approvedForAll cannot act over lsNFT
Summary
NFT approved users with
setApprovalForAll
cannot act as a single approved user.Vulnerability Detail
NFT can be approved in 2 ways, by
approve
and bysetApprovalForAll
._requireOnlyApprovedOrOwnerOf
should allow approved users to call privilege functions of lsNFT, but since NFT can only have one approved user withapprove
and multiple withsetApprovalForAll
, if the caller is approved withsetApprovalForAll
, he cannot act over NFT because thesetApprovalForAll
check is missing.MlumStaking.sol#L148-L151
Impact
A user who is approved with
setApprovalForAll
cannot call functions inMlumStaking.sol
.Code Snippet
https://github.com/sherlock-audit/2024-06-magicsea/blob/42e799446595c542eff9519353d3becc50cdba63/magicsea-staking/src/MlumStaking.sol#L148-L151
Tool used
Manual Review
Recommendation
Change
_requireOnlyApprovedOrOwnerOf
to check forERC721::isApprovedForAll
as well, just like inERC721::_isAuthorized
.Duplicate of #378
The text was updated successfully, but these errors were encountered: