The blockProfile function is intended to block a user’s profile but instead permanently deletes it by burning the associated NFT. This allows the blocked user to remint a new profile, bypassing the intended restriction.
The function blockProfile(address blockAddress) allows the contract owner to "block" a user’s profile. However, instead of enforcing a restriction, it:
Burns (_burn(tokenId)) the user’s profile NFT.
Deletes their profile data (delete profileToToken[blockAddress]).
Deletes their stored metadata (delete _profiles[tokenId]).
As a result, the user is not truly blocked; they can call mintProfile again to create a new profile with no restrictions.
Severity: Medium
Blocking a user should prevent them from reminting, but this implementation only removes their current profile.
Can be abused by malicious actors to continuously recreate profiles.
Users who should be blocked remain free to participate in the system.
Manual review of the Solidity code.
Foundry test cases to verify unintended behavior.
Instead of deleting the profile, implement a proper blocking mechanism using a mapping to track blocked users.
isBlocked
mapping ensures blocked users cannot remint.
notBlocked
modifier prevents blocked users from executing mintProfile()
.
No deletion of profile data—the profile remains in storage if needed for moderation purposes.
Add the notBlocked() modifier to the mintProfile function
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.