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.
- 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
- Report ID: #52796
- Report Type: Smart Contract
- Report severity: Low
- Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/arc/src/restrictions/WhitelistRestrictions.sol
- Impacts:
- Contract fails to deliver promised returns, but doesn't lose value
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:
- WhitelistRestrictions.isTransferAllowed() Logic:
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];
}
- Zero Address Cannot Be Whitelisted:
function addToWhitelist(address account) external onlyRole(MANAGER_ROLE) {
if (account == address(0)) {
revert InvalidAddress(); // Cannot whitelist address(0)
}
// ...
}
- 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)
- ArcToken Enforces Restrictions on these Operations:
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
- Admin sets
transfersAllowed = falseto enable whitelist restrictions {% endstep %}
{% step %}
Execution Flow Demonstrating the Bug — step
- Admin attempts to mint tokens to whitelisted user Alice {% endstep %}
{% step %}
Execution Flow Demonstrating the Bug — step
ArcToken.mint()calls_update(address(0), alice, amount){% endstep %}
{% step %}
Execution Flow Demonstrating the Bug — step
WhitelistRestrictions.isTransferAllowed(address(0), alice, amount)is called {% endstep %}
{% step %}
Execution Flow Demonstrating the Bug — step
- Returns
isWhitelisted[address(0)] && isWhitelisted[alice]=false && true=false{% endstep %}
{% step %}
Execution Flow Demonstrating the Bug — step
- Transaction reverts with
TransferRestricted(){% endstep %}
{% step %}
Execution Flow Demonstrating the Bug — step
- 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
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);
}
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
- Admin sets transfersAllowed to false to enable whitelist restrictions.
- Admin attempts to mint tokens to a whitelisted user.
- The mint calls the token update function with the zero address as sender.
- The whitelist check returns false because the zero address is not whitelisted.
- 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.