Skip to content
Access control Audit finding Beginner

MINTER BURNER ROLE can burn any amount of Yieldy from an arbitrary address

The burn function allows any address with the MINTER_BURNER_ROLE to burn tokens from any other address, not just its own. A malicious or compromised holder of that role could destroy arbitrary amounts of tokens belonging to any user.

0x1f8b Follow

Originally disclosed on Code4rena

Submitted by 0x1f8b

Using the burn() function of Yieldy, an address with MINTER_BURNER_ROLE can burn an arbitrary amount of tokens from any address.

We believe this is unnecessary and poses a serious centralization risk.

A malicious or compromised MINTER_BURNER_ROLE address can take advantage of this.

Recommended Mitigation Steps

Consider removing the MINTER_BURNER_ROLE and change burn() function to:

    function burn(uint256 _amount) external override
    {
        _burn(_msgSender(), _amount);
    }

toshiSat (Yieldy) acknowledged and commented:

There’s tons of centralization risks already, this is acknowledged, but for yieldies to work, there needs to be a trusted party.

JasoonS (judge) commented:

Leaving as medium - the code can be upgraded but the code is being assessed as is.


The original report as published on Code4rena, by 0x1f8b. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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 burn function does not restrict burning to the caller's own balance; it allows a privileged role to burn from any address.

Impact

A malicious or compromised MINTER_BURNER_ROLE address could burn any amount of tokens from any user, causing loss of funds and centralisation risk.

What the attacker needed

Compromised or malicious MINTER_BURNER_ROLE address

The fix

The role should be removed and the burn function changed to only burn from the caller's own address.

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, a special role can create or destroy tokens. Here, that role can also destroy tokens held by anyone else, not just its own. If that role is stolen or misused, it can wipe out other people's balances.

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.

More by 0x1f8b

View all

21 more disclosed reports, best first.

More from Yieldy contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.