Any user that hasn't minted via Soulmate::mintSoulmateToken()
will be able to call the Soulmate::writeMessageInSharedSpace()
to write a message to NFT ID #0.
The Soulmate::writeMessageInSharedSpace()
is intended for soulmates to write messages in their shared space. However, if a user hasn't minted a soulmate, this results in the id
local variable to be set to 0:
Since id
will be set to 0, the message will be written to sharedSpace[0]
which belongs to soulmates that own NFT ID #0.
This results in incorrect handling of state since anyone can write to sharedSpace[0]
.
You can see the following foundry test where a non-soulmate modifies the state
VS Code, Foundry
Add a new error and check the soulmateOf
mapping to see if msg.sender
has a soulmate before writing messages:
Medium Severity, This has an indirect impact and influence on the possibility of divorce between soulmates owning the first soulmate NFT id0, leading to permanent loss of ability to earn airdrops/staking rewards.
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.