52979 sc low whitelistrestrictions unintentionally disables mint and burn when transfers are restricted
Submitted on Aug 14th 2025 at 14:45:31 UTC by @RevertLord for Attackathon | Plume Network
Report ID: #52979
Report Type: Smart Contract
Report severity: Low
Target: https://github.com/immunefi-team/attackathon-plume-network/blob/main/arc/src/restrictions/WhitelistRestrictions.sol
Impacts:
Permanent freezing of funds
Description
Brief / Intro
I found a critical logic conflict in WhitelistRestrictions: when transfers are disabled (transfersAllowed == false), the module requires both from and to to be whitelisted for any transfer to pass. Because address(0) cannot be whitelisted, standard ERC20 mint (from == address(0)) and burn (to == address(0)) operations become impossible while restrictions are active.
This locks the issuer out of supply management and can permanently disrupt core token operations.
Vulnerability Details
Common pattern in the module:
addToWhitelist(address)rejectsaddress(0)(or batch-add silently skips it).isTransferAllowed(from, to, amount)returns true only iftransfersAllowed == trueOR both endpoints are whitelisted.Mint is implemented as a transfer from
address(0)-> user.Burn is implemented as a transfer from user ->
address(0).
Since address(0) can never be whitelisted, both mint and burn fail whenever transfers are restricted, even for holders and admins who are otherwise authorized.
Impact Details
Severity: Critical
In-scope impact: Permanent freezing of core supply mechanics (mint/burn). The protocol cannot expand or reduce supply while restrictions are active, which at minimum impedes redemptions and at worst stalls product operation entirely.
Suggested Mitigation
Special-case mint and burn in the transfer restriction check:
if (!ws.transfersAllowed) {
// Always allow mint or burn under restrictions
if (from == address(0) || to == address(0)) {
return true;
}
return ws.isWhitelisted[from] && ws.isWhitelisted[to];
}
return true;Alternatively:
Introduce distinct allowlists for mint and burn endpoints.
Document and enforce that the restriction module must not gate mint/burn paths.
Proof of Concept
A Foundry test (WhitelistBlocksMintBurn.t.sol) sets up ArcToken via the factory and links WhitelistRestrictions. With transfers allowed, mint and burn succeed. After setting transfersAllowed(false), attempts to mint and burn revert with a transfer restriction error, confirming that supply operations are blocked under active restrictions.
PoC Execution
Create the final foundry.toml file with the correct configuration and remappings
Create a file foundry.toml with the provided configuration (keeps solc, evm version, remappings, etc.).
Example content used in PoC:
[profile.default]
solc = "0.8.25"
evm_version = "cancun"
src = "src"
out = "out"
libs = ["lib"]
ffi = true
ast = true
build_info = true
extra_output = ["storageLayout"]
optimizer = true
optimizer_runs = 200
remappings = [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@solidstate/=lib/solidstate-solidity/contracts/",
"forge-std/=lib/forge-std/src/"
]
[fmt]
single_line_statement_blocks = "multi"
multiline_func_header = "params_first"
sort_imports = true
contract_new_lines = true
bracket_spacing = true
int_types = "long"
quote_style = "double"
number_underscore = "thousands"
wrap_comments = trueWas this helpful?