An incorrectly identified author will not be able to archive or restore reviews
Summary
Archiving and restoring reviews is wrongly authorized by msg.sender instead of by profile id.
Root Cause
The first-class citizen in the project is a profile. Such a profile can be identified by multiple addresses that can act on its behalf. The author of the review is always the profile, and the profile can edit the review.
The problem will appear in the archiveReview and restoreReview functions, where the author is identified by the msg.sender address. Such identification will prevent other addresses authorized to act on behalf of the profile from accessing these functions. The situation can be compared to a company that uses many logins to run one profile. All authorized persons should be able to perform actions, even if one employee has their access revoked.
A user who connects multiple addresses to a profile, e.g. for security purposes, after losing access to one of the addresses should be able to perform actions using other connected addresses. Identification by address instead of profile id will deprive him of access, making the above-mentioned functions useless.
PoC
No response
Mitigation
As with editing, the author should be identified by ID.
PNS
Medium
An incorrectly identified author will not be able to archive or restore reviews
Summary
Archiving and restoring reviews is wrongly authorized by msg.sender instead of by profile id.
Root Cause
The first-class citizen in the project is a profile. Such a profile can be identified by multiple addresses that can act on its behalf. The author of the review is always the profile, and the profile can edit the review.
The problem will appear in the
archiveReview
andrestoreReview
functions, where the author is identified by themsg.sender
address. Such identification will prevent other addresses authorized to act on behalf of the profile from accessing these functions. The situation can be compared to a company that uses many logins to run one profile. All authorized persons should be able to perform actions, even if one employee has their access revoked.EthosReview.archiveReview
EthosReview.restoreReview
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
A user who connects multiple addresses to a profile, e.g. for security purposes, after losing access to one of the addresses should be able to perform actions using other connected addresses. Identification by address instead of profile id will deprive him of access, making the above-mentioned functions useless.
PoC
No response
Mitigation
As with editing, the author should be identified by ID.