Skip to content
Business logic Audit finding Beginner

Whitelist restriction in arctoken blocks all minting and burning

The whitelist restriction module requires both sender and recipient to be whitelisted, but the zero address used in mint and burn operations cannot be whitelisted. When transfer restrictions are enabled, all minting and burning operations revert, even for whitelisted addresses.

ZeroExRes Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

52796 sc low whitelist restriction in arctoken blocks all minting and burning

Submitted on Aug 13th 2025 at 08:54:33 UTC by @ZeroExRes for Attackathon | Plume Network

Description

Brief/Intro

The WhitelistRestrictions module has a critical issue where enabling transfer restrictions (transfersAllowed = false) blocks all minting and burning operations, even for whitelisted addresses and role-protected administrative functions. This occurs because the module requires both sender AND recipient addresses to be whitelisted, but address(0) (used in mint/burn operations) cannot be whitelisted due to validation checks. This renders the whitelist feature completely unusable for transfer restrictions and can lead to inability to adjust tokenonomics.

Vulnerability Details

The core issue lies in the interaction below:

  1. WhitelistRestrictions.isTransferAllowed() Logic:
Solidity
function isTransferAllowed(address from, address to, uint256 /*amount*/) external view override returns (bool) {
    WhitelistStorage storage ws = _getWhitelistStorage();
    
    if (ws.transfersAllowed) {
        return true; // Unrestricted transfers
    }
    
    // BUG: Requires BOTH addresses to be whitelisted
    return ws.isWhitelisted[from] && ws.isWhitelisted[to];
}
  1. Zero Address Cannot Be Whitelisted:
Solidity
function addToWhitelist(address account) external onlyRole(MANAGER_ROLE) {
    if (account == address(0)) {
        revert InvalidAddress(); // Cannot whitelist address(0)
    }
    // ...
}
  1. ERC20 Mint/Burn Uses Zero Address: Openzeppelin implementation is
  • Minting: _update(address(0), recipient, amount) - from = address(0)
  • Burning: _update(sender, address(0), amount) - to = address(0)
  1. ArcToken Enforces Restrictions on these Operations:
Solidity
function _update(address from, address to, uint256 amount) internal virtual override {
    // ...
    if (specificTransferModule != address(0)) {
        transferAllowed = transferAllowed && 
            ITransferRestrictions(specificTransferModule).isTransferAllowed(from, to, amount);
    }
    
    if (!transferAllowed) {
        revert TransferRestricted(); // Blocks mint/burn when whitelist active
    }
    // ...
}

{% stepper %} {% step %}

Execution Flow Demonstrating the Bug — step

  1. Admin sets transfersAllowed = false to enable whitelist restrictions {% endstep %}

{% step %}

Execution Flow Demonstrating the Bug — step

  1. Admin attempts to mint tokens to whitelisted user Alice {% endstep %}

{% step %}

Execution Flow Demonstrating the Bug — step

  1. ArcToken.mint() calls _update(address(0), alice, amount) {% endstep %}

{% step %}

Execution Flow Demonstrating the Bug — step

  1. WhitelistRestrictions.isTransferAllowed(address(0), alice, amount) is called {% endstep %}

{% step %}

Execution Flow Demonstrating the Bug — step

  1. Returns isWhitelisted[address(0)] && isWhitelisted[alice] = false && true = false {% endstep %}

{% step %}

Execution Flow Demonstrating the Bug — step

  1. Transaction reverts with TransferRestricted() {% endstep %}

{% step %}

Execution Flow Demonstrating the Bug — step

  1. Same issue occurs for burning operations {% endstep %} {% endstepper %}

Impact Details

All minting and burning operations become permanently blocked when whitelist is enabled without disabling the whitelist entirely. In essence, this vulnerability makes the whitelist restriction feature completely unusable for its intended purpose, forcing admin to choose between transfer restrictions OR functional minting/burning, but never both. This may result in further issues, for example, transfer would need to allowed in whitelist restrictions, at least temporarily for mint/burn, risking non-compliant transfer by the existing holders.

References

Mentioned above.

Proof of Concept

Add to ArcToken.t.sol

Solidity
    function test_RevertWhen_MintingWithWhitelistEnabled() public {
    // 1. Verify alice is whitelisted (she was whitelisted in setUp)
    assertTrue(whitelistModule.isWhitelisted(alice));
    
    // 2. Try to whitelist address(0) - this should fail
    vm.expectRevert(WhitelistRestrictions.InvalidAddress.selector);
    whitelistModule.addToWhitelist(address(0));
    
    // 3. Confirm address(0) is NOT whitelisted
    assertFalse(whitelistModule.isWhitelisted(address(0)));
    
    // 4. Enable whitelist enforcement (disable open transfers)
    whitelistModule.setTransfersAllowed(false);
    assertFalse(whitelistModule.transfersAllowed());
    
    // 5. Try to mint tokens to alice (who IS whitelisted)
    // This fails because minting calls _update(address(0), alice, amount)
    // and address(0) cannot be whitelisted, so isTransferAllowed returns false
    vm.expectRevert(ArcToken.TransferRestricted.selector);
    token.mint(alice, 100e18);
}

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

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 whitelist check requires both the from and to addresses to be whitelisted, but the zero address used in mint and burn cannot be whitelisted, so the check always fails for those operations.

Impact

All minting and burning operations become permanently blocked when the whitelist is enabled, making the whitelist feature unusable for its intended purpose and forcing admins to choose between transfer restrictions or functional minting and burning.

What the attacker needed

Whitelist restrictions enabled; admin attempts to mint or burn

How it was found

  1. Admin sets transfersAllowed to false to enable whitelist restrictions.
  2. Admin attempts to mint tokens to a whitelisted user.
  3. The mint calls the token update function with the zero address as sender.
  4. The whitelist check returns false because the zero address is not whitelisted.
  5. The transaction reverts with TransferRestricted.

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 whitelist is a list of allowed addresses. This token contract uses a whitelist to control who can send and receive tokens. When the whitelist is turned on, the contract checks both the sender and the receiver. But minting (creating new tokens) and burning (destroying tokens) use a special empty address as one side. That empty address can never be added to the whitelist, so the check always fails and those operations are blocked.

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 ZeroExRes

View all

6 more disclosed reports, best first.

More from Plume Network

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.