sherlock-audit / 2024-10-ethos-network-judging

0 stars 0 forks source link

s0x0mtee - Anyone can register themselves or any address to any profile and delete the address of the owners of those profiles (including Owner's profile) they choose without even having a profile. #253

Open sherlock-admin2 opened 2 weeks ago

sherlock-admin2 commented 2 weeks ago

s0x0mtee

High

Anyone can register themselves or any address to any profile and delete the address of the owners of those profiles (including Owner's profile) they choose without even having a profile.

Summary

registerAddress() has no check to ensure profileIdByAddress(msg.sender) != 0 hence attackers(or even regular users ) can hijack other peoples profiles and registering their addresses to that profile. All they need is to know the profileId of the profile they want to hijack. Which can lead to lots and lots spam reviews and votes, which would reduce the integrity of the protocol.

Root Cause

Internal pre-conditions

  1. Attacker/User calls registerAddress()
  2. _profileShouldHaveInvites() returns true (The profile has not exceeded it's invite limit).

External pre-conditions

  1. Attacker obtains the profileId of target profile.

Attack Path

  1. Attacker/User calls registerAddress() with any valid profileId.

Impact

PoC

No response

Mitigation

No response