Description:
Currently, the contract owner cannot block a user permanently without the user re-entering the protocol. This issue arises because there is no tracking of blocked addresses, which allows the affected user to bypass the block by simply calling the SoulboundProfileNFT::mintProfile()
function again. This process can be repeated indefinitely, undermining the effectiveness of the blocking mechanism.
Impact:
Medium. Once a user is blocked, they should not be able to re-enter the protocol unless explicitly unblocked by the contract owner. The current system allows blocked users to mint a new profile and re-enter the app.
Proof of Concept:
A user can bypass a block and re-enter the dating app by minting their NFT again, even after being blocked. Here's an example of how the exploit works:
Recommended Mitigation:
To resolve this issue, a mapping should be created to store blocked addresses. When the owner blocks an address, the mapping should be updated, and checks should be added during profile minting to prevent blocked users from re-entering the protocol:
Additionally, update the mintProfile()
function to check whether the user is blocked before allowing them to mint a new profile:
By adding this mapping and check, the owner can effectively block users, and blocked users will no longer be able to bypass the block by re-minting their profiles.
Likelihood: Low, any blocked users. Impact: High, not really blocked.
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.