Skip to content
DoS Audit finding Intermediate

Deactivating istransferallowed indirectly doses minting burning functionality

When the admin disables transfers in the whitelist restriction module, the token's transfer check also applies to minting and burning, which use the zero address. Because the zero address can never be whitelisted, minting and burning revert permanently.

Am3nh3l Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

51929 sc low deactivating istransferallowed indirectly doses minting burning functionality

Submitted on Aug 6th 2025 at 16:46:44 UTC by @Am3nh3l for Attackathon | Plume Network

Description / Brief

When transfersAllowed is disabled in WhitelistRestrictions, minting and burning ArcTokens become permanently impossible because address(0) cannot be whitelisted. This creates a permanent denial-of-service condition for core token functionality.


Vulnerability Details

The WhitelistRestrictions contract controls transfer permissions via the transfersAllowed flag:

Solidity
function setTransfersAllowed(
    bool allowed
) external onlyRole(ADMIN_ROLE) {
    _getWhitelistStorage().transfersAllowed = allowed;
    emit TransfersRestrictionToggled(allowed);
}

When transfersAllowed is false, the isTransferAllowed function requires both from and to addresses to be whitelisted:

Solidity
function isTransferAllowed(address from, address to, uint256 /*amount*/) external view override returns (bool) {
    WhitelistStorage storage ws = _getWhitelistStorage();
    if (ws.transfersAllowed) {
        return true;
    }
    return ws.isWhitelisted[from] && ws.isWhitelisted[to];
}

However, addToWhitelist prevents whitelisting address(0):

Solidity
function addToWhitelist(
    address account
) external onlyRole(MANAGER_ROLE) {
    if (account == address(0)) {
        revert InvalidAddress();
    }

    WhitelistStorage storage ws = _getWhitelistStorage();
    if (ws.isWhitelisted[account]) {
        revert AlreadyWhitelisted(account);
    }

    ws.isWhitelisted[account] = true;
    ws.whitelistedAddresses.add(account);
    emit WhitelistStatusChanged(account, true);
    emit AddedToWhitelist(account);
}

In ArcToken, the _update function, used for all token movements (including minting and burning), enforces transfer restrictions:

Solidity
function _update(address from, address to, uint256 amount) internal virtual override {
    //...
    address specificTransferModule = $.specificRestrictionModules[RestrictionTypes.TRANSFER_RESTRICTION_TYPE];
    if (specificTransferModule != address(0)) {
        transferAllowed =
@>1             transferAllowed && ITransferRestrictions(specificTransferModule).isTransferAllowed(from, to, amount);
    }

    address globalTransferModule = IRestrictionsRouter(routerAddr).getGlobalModuleAddress(RestrictionTypes.GLOBAL_SANCTIONS_TYPE);
    if (globalTransferModule != address(0)) {
        try ITransferRestrictions(globalTransferModule).isTransferAllowed(from, to, amount) returns (
            bool globalAllowed
        ) {
@>2         transferAllowed = transferAllowed && globalAllowed;
        } catch {
            transferAllowed = false;
        }
    }

    if (!transferAllowed) {
@>3     revert TransferRestricted();
    }

    //...
}

Minting uses from = address(0) and burning uses to = address(0). If _getWhitelistStorage().transfersAllowed is false, minting and burning fail because address(0) cannot be whitelisted, causing isTransferAllowed to return false and transactions to revert with TransferRestricted.


Impact Details

Setting transfersAllowed to false indirectly prevents minting and burning of ArcToken, halting critical functionality like issuing new tokens or reducing supply. This DoS affects token management and disrupts operations. There is no recovery path without either opening transfers to all users (defeating the whitelist) or allowing address(0) to be whitelisted (currently prevented).


Proof of Concept

{% stepper %} {% step %}

Steps to reproduce

  1. Global/Specific admin calls setTransfersAllowed(false) in WhitelistRestrictions. {% endstep %}

{% step %} 2. Token admin attempts to mint tokens to a user via ArcToken.mint(). {% endstep %}

{% step %} 3. Mint triggers a transfer check from address(0) to recipient; isTransferAllowed(address(0), recipient, amount) is called. {% endstep %}

{% step %} 4. isTransferAllowed requires both addresses to be whitelisted, but address(0) cannot be whitelisted due to addToWhitelist reverting on address(0). {% endstep %}

{% step %} 5. The whitelist check fails and the mint transaction reverts with TransferRestricted. {% endstep %}

{% step %} 6. The same failure occurs for burn operations (which use to = address(0)). {% endstep %}

{% step %} 7. No recovery is possible since address(0) cannot be whitelisted under current contract logic. {% endstep %} {% endstepper %}


References

(Add any relevant links to documentation or code)


The original report as published on Immunefi, by Am3nh3l. 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 transfer restriction check is applied to all token movements including mint and burn, but the zero address used by those operations can never be whitelisted.

Impact

Minting and burning of the token could be permanently blocked while transfers are disabled, with no recovery path other than opening transfers to everyone or changing the contract logic.

What the attacker needed

Admin disables transfers; token admin attempts mint or burn

The fix

The transfer restriction should exempt minting and burning, for example by skipping the whitelist check when either address is the zero address.

How it was found

  1. An admin disables transfers in the whitelist restriction contract.
  2. A token admin tries to mint tokens to a user.
  3. The mint triggers a transfer check from the zero address to the recipient.
  4. The check fails because the zero address cannot be whitelisted.
  5. The mint transaction reverts with a transfer-restricted error.
  6. Burning fails in the same way because it uses the zero address as the recipient.

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 token contract can have a rule that only approved addresses may send or receive tokens. Minting (creating new tokens) and burning (destroying tokens) are treated internally as transfers to or from a special empty address that represents 'nobody'. The report shows that if an admin turns on the approval-only rule, this empty address is not on the approved list and cannot be added, so creating or destroying tokens stops working.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by Am3nh3l

View all

3 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.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.