In the upgradeTier
function, there is no check to ensure that the caller (msg.sender
) actually owns the NFT at the current tier (fromTierIndex
) before performing the burn
and mint
actions to upgrade to a higher tier. This creates a risk of failure if the user tries to upgrade without owning the NFT in that tier, leading to errors when burning the NFT and potentially other issues.
The upgradeTier
function upgrades between membership tiers by calling burn
to destroy the NFT at the current tier (fromTierIndex
) and then minting a new NFT at a higher tier. However, if the caller does not actually own the NFT at fromTierIndex
, the burn
action will fail and cause the transaction to error, impacting system stability. This issue could be exploited to create denial of service (DoS) attacks if the transaction is repeatedly reverted.
https://github.com/Cyfrin/2024-11-one-world/blob/main/contracts/dao/MembershipFactory.sol#L155-L161
If the user does not own the NFT at fromTierIndex
and attempts to upgrade, the transaction will revert when the burn fails.
Manual
Check to ensure that the user owns at least one NFT at fromTierIndex
.
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.