The system currently allows both a first user (who mints a SoulmateFT) and a new user (without minting a Soulmate NFT) to access the same shared space, i.e., sharedSpace[0]
. This open access defies the primary purpose of the NFT, which is to govern access and rights to shared space. Further analysis is warranted to ensure the integrity and security of the shared spaces.
The key issue lies in the implementation of the shared space access. Currently, a new user without possessing the Soulmate NFT can write to and read from the shared space allocated to the first user who minted such an NFT. This effectively makes the unique benefits that come with NFT minting open to all users and negates the exclusivity of access.
This vulnerability has potential security and privacy implications. Allowing unconstrained access to shared space compromises user exclusivity and privacy. Shared space content could be manipulated by unauthorized parties, leading to potential data integrity issues.
Manual Review
Considering potential implications, an immediate review and modification of the contract are suggested:
Restricted Access: Implement restricted access for the writeMessageInSharedSpace
and readMessageInSharedSpace
functions. Ensure these functions can be called only by the Soulmate NFT holder.
Add the following code in functions Soulmate:writeMessageInSharedSpace
and Soulmate:readMessageInSharedSpace
.
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.