The internal function _burn in ERC20Internals.sol performs unchecked subtraction on both the _totalSupply and the account’s balance inside inline assembly, without verifying that the account has sufficient balance or that total supply is sufficient.
Because arithmetic in inline assembly is not checked (Solidity ≥0.8 overflow/underflow checks do not apply), calling _burn(account, value) when account has less than value tokens causes:
_totalSupply to underflow and wrap to 2²⁵⁶ - 1.
_balances[account] to underflow and wrap to 2²⁵⁶ - 1.
This breaks core ERC20 invariants:
An account can “burn” more tokens than it owns and end up with max uint256 balance.
Total supply is corrupted to max uint256, effectively acting like an unbounded mint.
Any external function (like Token.burn) that exposes _burn can be abused to mint an effectively unlimited number of tokens to an arbitrary address.
Create a file called Token.t.sol and paste this poc in it:
Run with forge test -vvv --mt test_burnUnderflowExploit
Consider adding balance and supply checks in _burn before subtraction.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.