Admin Privilege in minting to arbitrary address allows operator to dilute tokens
The veTokenMinter contract lets any address added as an operator mint new tokens to any address. Because the admin can add themselves as an operator, they could mint excess tokens and dilute existing holders.
Originally disclosed on Code4rena
Submitted by Alex the Entreprenerd, also found by IllIllI
veTokenMinter allows any operator to mint new tokens, that’s fine in the context of it being used for:
- having
VeAssetDepositordeposit for the user and mint - Having the
Boostermint reward tokens
However because of the open ended system that allows any address to be set as operator, the system allows the admin to set themselves as the operator and to mint an excess amount of tokens, diluting other users.
Because this seems to be used exclusively by the VeAssetDepositor and the Booster hardcoding these two addresses would provide stronger security guarantees.
Proof of Concept
addOperator(malicious, {“from”: gov})
mint(malicious, AMOUNT, {“from”: malicious})
Recommended Mitigation Steps
Set the minters as immutable to provide stronger security guarantees.
jetbrain10 (veToken Finance) acknowledged, but disagreed with severity and commented:
Admin will be controlled by DAO to prevent this happen.
Alex the Entreprenerd (judge) commented:
Because am judging the contest am forfeiting any winnings.
I do believe that the system would be best if the minters where hardcoded (it would also save gas).
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
Likely the minter role is not restricted to the two contracts that need it, so the admin can grant minting rights to any address, including their own.
Impact
The admin could mint excess tokens and dilute other holders; the project argued the admin is controlled by a DAO, which they said prevents this.
What the attacker needed
Admin or DAO controls the minter role
The fix
The minters should be hardcoded or immutable so only the intended depositor and booster contracts can mint.
How it was found
- The admin adds a chosen address as an operator.
- That operator mints a large amount of tokens to itself.
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.
A token contract has a special role called an operator that is allowed to create new tokens. The report says the admin can give themselves this role and create extra tokens, which makes everyone else's share worth less. This is a trust problem rather than a break-in, because the admin already has power over the contract.
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.