blockProfile Stale State — Blocked Users Exploit Pre-Block Likes After Re-MintSoulboundProfileNFT.sol
LikeRegistry.sol
blockProfile() burns the user's NFT and clears profileToToken, but does NOT clean up likes[] mappings in LikeRegistry. A blocked user can re-mint a new profile, and their old likes persist — enabling match exploitation using stale pre-block data.
Likelihood: Medium — Requires blocked user to re-mint and another user to like them.
Impact: Medium — Bypasses owner's moderation. Blocked user regains matches and potential rewards using stale, pre-block like data.
Severity: Medium
SWC: SWC-124 (Write to Arbitrary Storage Location — inverse: failure to clear state)
CWE: CWE-459 (Incomplete Cleanup)
Evidence Grade: A
Alice likes Bob, owner blocks Alice, Alice re-mints profile, Bob likes Alice — mutual match triggers using Alice's stale pre-block like.
forge test --match-test test_FINDING008_blockProfile_stale_state -vvvv → PASS
The cross-contract state inconsistency occurs because SoulboundProfileNFT has no way to notify LikeRegistry when a profile is burned or blocked. Adding a per-user epoch counter that increments on every mint invalidates all prior likes without requiring explicit cleanup. The mutual-like check then verifies that both users' epochs match their stored like epoch.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.