Only the author address of a review can restore and archive the review.
Summary
The EthosReview::archiveReview and EthosReview::restoreReview functions can only be called by the author address of the review, but the review is linked to the author's profile which is an issue since an address can be removed from a profile
User A's profile should have more than one address registered.
Account B registered to User A's profile authors a review on behalf of the profile
User A removes account B from their profile
External pre-conditions
No response
Attack Path
User A registers account B by calling EthosProfile::registerAddress to their profile.
account B calls EthosReview::addReview and adds a review to the profile
account B is compromised and User A calls EthosProfile::deleteAddressAtIndex to remove account B
User A will be unable to archive the review or restore it if account B archives it meanwhile account B can still archive and restore the review for the profile they aren't associated with anymore as they are the author.
Impact
User A will lose the capability of archiving and restoring the review as the address that authored it has been removed from the profile. While account B will still be able to archive and restore the reviews.
heeze
Medium
Only the author address of a review can restore and archive the review.
Summary
The
EthosReview::archiveReview
andEthosReview::restoreReview
functions can only be called by the author address of the review, but the review is linked to the author's profile which is an issue since an address can be removed from a profileRoot Cause
In EthosReview::archiveReview and EthosReview::restoreReview allowing only the author's address of a review to archive and restore the review.
Internal pre-conditions
External pre-conditions
No response
Attack Path
EthosProfile::registerAddress
to their profile.EthosReview::addReview
and adds a review to the profileEthosProfile::deleteAddressAtIndex
to remove account BImpact
User A will lose the capability of archiving and restoring the review as the address that authored it has been removed from the profile. While account B will still be able to archive and restore the reviews.
PoC
Mitigation
Only addresses linked to a profile should be able to restore and archive a review on behalf of the profile.