Skip to content
Business logic Audit finding Intermediate

Unrestricted changes to token settings allow artists to alter critical features

The updateArtSettings function lets artists change soulbound status, royalties, and URI at any time without restrictions. This could trap users who bought transferable NFTs, force unexpected high royalties on resale, or redirect users to malicious links.

0xCiphky Follow with MrPotatoMagic, petarP1998 and 8 others

Originally disclosed on Code4rena

Submitted by 0xCiphky, also found by MrPotatoMagic, rbserver (1, 2), petarP1998, pipidu83, kuprum (1, 2), ironside, onthehunt11, OpaBatyo, 0xNirix (1, 2), eierina, hail_the_lord, Trooper, 0xBeastBoy (1, 2), and NexusAudits

The updateArtSettings function in the PhiFactory contract allows artists to modify several key settings of their art at any time. These settings include the URI link, royalty fee and soulBounded (non-transferable) feature.

    function updateArtSettings(
        uint256 artId_,
        string memory url_,
        address receiver_,
        uint256 maxSupply_,
        uint256 mintFee_,
        uint256 startTime_,
        uint256 endTime_,
        bool soulBounded_,
        IPhiNFT1155Ownable.RoyaltyConfiguration memory configuration
    )
        external
        onlyArtCreator(artId_)
    {
        ...
        art.receiver = receiver_;
        art.maxSupply = maxSupply_;
        art.mintFee = mintFee_;
        art.startTime = startTime_;
        art.endTime = endTime_;
        art.soulBounded = soulBounded_;
        art.uri = url_;

        uint256 tokenId = IPhiNFT1155Ownable(art.artAddress).getTokenIdFromFactoryArtId(artId_);
        IPhiNFT1155Ownable(art.artAddress).updateRoyalties(tokenId, configuration);
        emit ArtUpdated(artId_, url_, receiver_, maxSupply_, mintFee_, startTime_, endTime_, soulBounded_);
    }

The problem is that there are no restrictions or limitations on how these settings can be changed after the art has been created and minted. This flexibility allows artists to alter critical functionalities in ways that could negatively impact existing holders:

  1. Changing Soulbound Status: Artists can toggle the soulBounded status to lock transfers, effectively trapping users who purchased NFTs under the assumption they were transferable.
  2. Modifying Royalties: Artists can set royalty fees to extremely high values after initial sales, forcing holders to pay unexpected fees upon resale.
  3. Updating URLs: Artists can change the linkURI, potentially misleading users or affecting the NFT’s perceived value by altering the associated content. In the worst case, the URL could be changed to a malicious link, posing security risks to users who interact with it.

These changes can be made at any time, without prior notice to holders, leaving users vulnerable to unfavourable adjustments.

Impact

Allowing unrestricted changes to critical token settings poses a significant risk to the stability and trustworthiness of the NFTs. Users who have already minted or purchased NFTs could be adversely affected by changes they did not agree to, such as increased fees or transfer restrictions.

Recommendation

Implement limits on how and when critical settings can be changed, such as capping royalty rates. This would help protect users while maintaining some flexibility for artists.

ZaK3939 (Phi) confirmed and commented:

Given the specifications of our NFT, which is relatively inexpensive and doesn’t have strict conditions regarding the number of mints, we feel that classifying this as a High severity issue is inappropriate.

We will implement the fix. Regarding updates, we will remove the Soulbound feature and the URI update functionality.

As for royalties, some other platforms allow up to 100% royalties. While we’re using EIP-2981, which is not mandatory, we plan to implement a maximum royalty of around 20%.

0xDjango (judge) commented:

I am going to rule HIGH on this one. All three conditions outlined by the warden are medium/high, and the accumulation of all three makes this a clear high in my opinion.


The original report as published on Code4rena, by 0xCiphky. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The updateArtSettings function lacks any restrictions or time limits on changing critical token settings after minting.

Impact

Users who already minted or purchased NFTs could be adversely affected by changes they did not agree to, such as increased fees or transfer restrictions.

What the attacker needed

Artist is the art creator; art has been minted

The fix

The project said it will remove the soulbound and URI update features and cap royalties at around 20%.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

An NFT is a digital token that can be bought and sold. The artist who created it can change some of its rules after people have already bought it. This means buyers might suddenly find they cannot transfer their token, have to pay much higher fees when reselling, or be sent to a harmful website.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by 0xCiphky

View all

11 more disclosed reports, best first.

More from Phi

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.