Skip to content

Burn Authorization / Burn-From Missing Checks

SAFE-0055 Token Standards Checked automatically by the scanner
1

What goes wrong

A burn or burnFrom function does not verify allowance/ownership, letting an attacker burn other users' tokens, or burns without updating dependent accounting (rewards, shares).

2

How to fix it

the pattern that is safe
function burnFrom(address from, uint256 amt) external {
    _spendAllowance(from, msg.sender, amt);
    _burn(from, amt);
}
Enforce allowance/ownership on burns.
Check your own contract for this

The SaferICO scanner runs 201 detectors over your Solidity source, SAFE-0055 among them. Paste an address or the source itself — a small per-scan fee, shown before you sign, or unlimited on any plan.

Run the scanner See how it is attacked Read the docs