No access control on assignFees() function in NFTXVaultFactoryUpgradeable contract
The assignFees() function in the NFTXVaultFactoryUpgradeable contract lacks access control, allowing any user to call it and update all fees. If the vault owner sets factoryMintFee and factoryRandomRedeemFee to zero, an attacker could change these fees.
Submitted by ych18
If the Vault owner decides to set factoryMintFee and factoryRandomRedeemFee to zero, any user could call the function NFTXVaultFactoryUpgradeable.assignFees() and hence all the fees are updated.
0xKiwi (NFTX) confirmed and commented:
This function is left over from some upgrades. It will be removed. Thank you.
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
If the vault owner sets factoryMintFee and factoryRandomRedeemFee to zero, any user could call assignFees() and update all fees, potentially disrupting the fee structure.
What the attacker needed
Vault owner sets factoryMintFee and factoryRandomRedeemFee…
The fix
The function was removed as it was left over from upgrades.
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.
Smart contracts often have functions that change important settings, like fees. If such a function does not check who is calling it, anyone can call it and change those settings. Here, the function that updates fees could be called by any user, potentially allowing them to set fees to whatever they want.
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.