DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Lack of Identity Verification Enables Profile Impersonation

Summary

The SoulboundProfileNFT contract allows users to create profiles without any verification of identity or uniqueness checks. This enables malicious actors to create profiles impersonating other individuals, potentially leading to fraud and platform abuse.

Vulnerable Code

function mintProfile(string memory name, uint8 age, string memory profileImage) external {
require(profileToToken[msg.sender] == 0, "Profile already exists");
uint256 tokenId = ++_nextTokenId;
_safeMint(msg.sender, tokenId);
_profiles[tokenId] = Profile(name, age, profileImage);
profileToToken[msg.sender] = tokenId;
emit ProfileMinted(msg.sender, tokenId, name, age, profileImage);
}

The contract lacks:

  1. Name uniqueness validation

  2. Identity verification mechanisms

  3. Profile detail duplication checks

  4. Anti-spoofing measures

Proof of Concept

function testProfileImpersonation() external {
// Anyone can create a profile with Vitalik's name
vm.prank(user);
soulboundNFT.mintProfile("Vitalik Buterin", 29, "https://example.com/vitalik.jpg");
// Another user can create the exact same profile
vm.prank(user2);
soulboundNFT.mintProfile("Vitalik Buterin", 29, "https://example.com/vitalik.jpg");
uint256 tokenId = soulboundNFT.profileToToken(user2);
assertEq(tokenId, 2, "Token should minted for two users with same profile");
}

Impact

  • Users can create profiles impersonating celebrities, public figures, or other users

  • Platform credibility and trust are compromised

  • Potential for fraud and scams increases

  • User safety and platform integrity are at risk

Tools Used

Manual review

Foundry for POC

Recommendations

Implement profile uniqueness checks:

mapping(bytes32 => bool) private _usedProfiles;
function mintProfile(string memory name, uint8 age, string memory profileImage) external {
bytes32 profileHash = keccak256(abi.encodePacked(name, age, profileImage));
require(!_usedProfiles[profileHash], "Profile details already exist");
_usedProfiles[profileHash] = true;
// Rest of the function
}
Updates

Appeal created

n0kto Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

invalid_URI_injection_scam_underaged_bad_name_photo_etc

Scamming/phishing is not the protocol problem, that's a user mistake. NFT are unique, even if someone does a copy of your profile (which is also possible in web2), I consider it informational. Injection is a problem for the web2 part of the protocol, not a bug here. For the age, it depends on the countries law and future medicine. Anyways, that's more an ethical/political problem, not a bug.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.