Open sherlock-admin4 opened 2 weeks ago
smbv-1923
Medium
archiveReview() and
EthosProfile which contains multiple address cannot work with archiveReview() andrestoreReview()`
https://github.com/sherlock-audit/2024-10-ethos-network/blob/main/ethos/packages/contracts/contracts/EthosReview.sol#L300 https://github.com/sherlock-audit/2024-10-ethos-network/blob/main/ethos/packages/contracts/contracts/EthosReview.sol#L321
No response
addReview()
reviews[reviewCount] = Review({ archived: false, score: score, authorProfileId: authorProfileId, author: msg.sender, subject: subject, reviewId: reviewCount, // solhint-disable-next-line not-rely-on-time createdAt: block.timestamp, comment: comment, metadata: metadata, attestationDetails: attestationDetails });
if (review.author != msg.sender) { revert UnauthorizedArchiving(reviewId); }
In case of account compromises, a profile can unregister an account and mark it as compromised.
editReview()
if (review.authorProfileId != authorProfileId) { revert UnauthorizedEdit(reviewId); }
smbv-1923
Medium
EthosProfile which contains multiple address cannot work with
archiveReview() and
restoreReview()`Summary
EthosProfile which contains multiple address cannot work with
archiveReview() and
restoreReview()`Root Cause
https://github.com/sherlock-audit/2024-10-ethos-network/blob/main/ethos/packages/contracts/contracts/EthosReview.sol#L300 https://github.com/sherlock-audit/2024-10-ethos-network/blob/main/ethos/packages/contracts/contracts/EthosReview.sol#L321
Internal pre-conditions
External pre-conditions
No response
Attack Path
addReview()
where author is set as msg.senderarchiveReview() and
restoreReview()` because of the below checkIn case of account compromises, a profile can unregister an account and mark it as compromised.
editReview()
Impact
PoC
No response
Mitigation
editReview()