Burn access control can be bypassed
The transferFrom function does not check if the recipient address is the zero address, allowing tokens to be burned without calling the burn function. This bypasses the access control that restricts burning to the MINTER_BURNER_ROLE.
Submitted by pashov, also found by csanuragjain, hake, kenta, m_Rassska, and oyc_109
transferFrom method does not check if _to argument is the zero address.
Impact
This can lead to token burns without calling the burn function, which has access control onlyRole(MINTER_BURNER_ROLE) but here this can be bypassed by passing the zero address as the value of _to.
Recommended Mitigation Steps
Add a non-zero address check for _to argument in transferFrom.
toshiSat (Yieldy) confirmed and resolved
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
Impact
An attacker could burn tokens without the required MINTER_BURNER_ROLE, bypassing access control.
What the attacker needed
None
The fix
Add a non-zero address check for the _to argument in transferFrom.
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.
In many token contracts, sending tokens to the zero address (a special address with no owner) effectively destroys them, similar to burning. The burn function is supposed to be restricted to certain roles, but because transferFrom allows sending to the zero address, anyone can burn tokens without permission.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.