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

0 stars 0 forks source link

0xlookman - 0xlookman: Using own but unregistered attestation users can review their own profiles. #254

Open sherlock-admin3 opened 3 weeks ago

sherlock-admin3 commented 3 weeks ago

0xlookman

Medium

0xlookman: Using own but unregistered attestation users can review their own profiles.

Summary

By waiting to claim their attestations, users can first review their own profiles before claiming these attestation.

Root Cause

In ethosReview.sol, profiles are not supposed to review their own profiles, but before claiming the attestation, a user can first provide a review to his own profileId since a mock id will be created for that review and anytime he can claim his attestation hash and it will be assigned to him.

Internal pre-conditions

Attestation not yet claimed by the user or registered in the attestation contract.

External pre-conditions

No response

Attack Path

  1. Profile user creates a review using attestation details instead of subject address.
  2. The attestation details get a mock id and provide review to the profile.
  3. User goes to attestation contract and claims the attestation details changing the attestation id to his own.

Impact

Reviews are to show credibility of profiles in the protocol and users can manipulate this to review themselves.

PoC

Mitigation

When claiming attestations, the protocol should first see it was not used before to review this same profile as a mock