Skip to content
Access control Audit finding Intermediate

Non-whitelisted owner can also hold/own a troveNFT

The protocol requires a trove owner to be whitelisted when opening a trove, but the trove NFT is freely transferable, so a whitelisted holder can move it to a non-whitelisted address. This lets a non-whitelisted party end up owning a trove, bypassing the intended access restriction.

araj Follow with 0xDemon and gesha17

Originally disclosed on Code4rena

Submitted by araj, also found by 0xDemon and gesha17

https://github.com/code-423n4/2025-04-bitvault/blob/04694fc83f4183e4c57a52599be624fb4aadc013/contracts/src/BorrowerOperations.sol#L228

https://github.com/code-423n4/2025-04-bitvault/blob/04694fc83f4183e4c57a52599be624fb4aadc013/contracts/src/TroveManager.sol#L1314

Finding description and impact

When a user opens a trove, troveNFT is minted to owner and it requires the owner to be whitelisted i.e. non-whitelisted owners are not allowed to mint/own the troveNFT.

    function openTrove(
        address _owner,
        uint256 _ownerIndex,
        uint256 _collAmount,
        uint256 _boldAmount,
        uint256 _upperHint,
        uint256 _lowerHint,
        uint256 _annualInterestRate,
        uint256 _maxUpfrontFee,
        address _addManager,
        address _removeManager,
        address _receiver
    ) external override returns (uint256) {
        _requireValidAnnualInterestRate(_annualInterestRate);

        IWhitelist _whitelist = whitelist;
        if (address(_whitelist) != address(0)) {
@>          _requireWhitelisted(_whitelist, _owner);
            _requireWhitelisted(_whitelist, msg.sender);
            if (_receiver != address(0)) {
                _requireWhitelisted(whitelist, _receiver);
            }
        }

....
    }
    function onOpenTrove(
        address _owner,
        uint256 _troveId,
        TroveChange memory _troveChange,
        uint256 _annualInterestRate
    ) external {
....

        // mint ERC721
@>      troveNFT.mint(_owner, _troveId);

....
    }

However, this whitelist requirement can be bypassed because troveNFTs are transferable and a whitelisted owner can transfer his troveNFT to a non-whitelisted owner, bypassing the whitelist requirement

Recommended mitigation steps

Override the transferFrom() of troveNFT.sol and add this _requireWhitelisted() for receiver

RedVeil (BitVault) confirmed


The original report as published on Code4rena, by araj. 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

Likely the whitelist check is only applied at trove creation, while the NFT transfer path lacks any recipient whitelist validation.

Impact

A non-whitelisted address could hold and own a trove, defeating the protocol's access restriction on who may participate.

What the attacker needed

A whitelisted account; trove NFT is transferable

How it was found

  1. A whitelisted user opens a trove, which mints the trove NFT to them.
  2. That user transfers the trove NFT to a non-whitelisted address.
  3. The non-whitelisted address now owns the trove despite never passing the whitelist check.

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.

A trove is a record of collateral and debt held in a smart contract, represented by a transferable token. The project wanted only approved (whitelisted) addresses to hold these tokens, and it checked this when a trove was first created. But it never checked the recipient when the token was later transferred, so an approved user could simply hand the token to anyone.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by araj

View all

2 more disclosed reports, best first.

More from BitVault

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.