Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: medium
Invalid

Owner can set themselves as trustee to control asset valuations after death

Summary

The InheritanceManager contract allows any beneficiary to appoint a trustee through the appointTrustee() function after inheritance is triggered. This creates a vulnerability where the owner can add themselves as a beneficiary (twice if needed to bypass some checks), trigger inheritance, and appoint themselves as trustee. As trustee, they gain the ability to arbitrarily change NFT valuations, potentially manipulating estate values to their advantage.

Vulnerability Details

The vulnerability involves several components:

  1. The owner can add themselves as a beneficiary

  2. After inheritance is triggered, any beneficiary (including the owner) can appoint a trustee - themselves

  3. A trustee can change the value of any NFT estate

  4. A trustee can also change which asset is used for payment

This allows a malicious owner to:

  1. Add themselves as a beneficiary

  2. Wait for inheritance to trigger

  3. Appoint themselves as trustee

  4. Adjust NFT values to favorable amounts

  5. Change payment assets to ones they control or that have little value

\

Impact

This vulnerability undermines the entire inheritance system:

Estate Value Manipulation: A malicious owner can set arbitrarily high or low values for estate NFTs after inheritance is triggered.

Payment Asset Manipulation: They can change what token is used for payment to a worthless or manipulated token.

Beneficiary Trust Violation: The trustee role is meant to be independent, but this vulnerability allows continued owner control.

Circumvention of Inheritance Intent: The owner can effectively maintain control of asset valuation after their "death" (inactivity period).

Tools Used

Manual code review

Recommendations

Restrict Self-Appointment: Prevent owners from adding themselves as beneficiaries:
function addBeneficiery(address _beneficiary) external onlyOwner {
require(_beneficiary != owner, "Owner cannot be a beneficiary");
beneficiaries.push(_beneficiary);
_setDeadline();
}

Implement Trustee Consensus: Require multiple beneficiaries to approve trustee appointments

Add Trustee Restrictions: Prevent current or former owners from becoming trustees

function appointTrustee(address _trustee) external onlyBeneficiaryWithIsInherited {
require(_trustee != owner && _trustee != getOwner(), "Owner cannot be trustee");
trustee = _trustee;
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!