The 'mint' function is restricted to the contract owner, centralizing the minting authority to a single address. This setup poses a risk, as the owner has the ability to transfer ownership to another address. If the owner is compromised or acts maliciously, this could lead to potential security vulnerabilities.
Code snippet: 2024-07-zaros/src/account-nft/AccountNFT.sol Lines: 1 - 30
I try to construct an attack scenario and the test contract code to exploit the centralization risk for trusted owners in the original AccountNFT
contract.
The attacker gains control over the original owner's private key.
The attacker uses the compromised key to transfer contract ownership to themselves.
As the new owner, the attacker mints new tokens to addresses they control.
Confirming ownership of the newly minted tokens.
It verifies that the exploit contract's address holds the newly minted tokens and checks the ownership of each token.
The ability to mint tokens at will can lead to an uncontrolled increase in the token supply, devaluing the tokens and potentially causing significant financial loss to stakeholders. Besides, the centralization of minting rights in a single address (especially if compromised) undermines the trust in the contract's governance and operation. It can allow the attacker to control the token distribution and manipulate the ecosystem.
Manual Review
The 'multiSigWallet' address is designated for ownership control, ensuring that critical actions necessitate multiple signatures. The 'updateMultiSigWallet' function allows for updating the multi-sig wallet address with appropriate access controls. Furthermore, we recommend implementing role-based access control and timelocks for sensitive operations.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.