Closed c4-bot-6 closed 7 months ago
raymondfam marked the issue as insufficient quality report
raymondfam marked the issue as duplicate of #20
HickupHH3 marked the issue as not a duplicate
recommendation, but does not identify the vuln of not being able to revoke roles
HickupHH3 changed the severity to QA (Quality Assurance)
1R
HickupHH3 marked the issue as grade-c
Lines of code
https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/Neuron.sol#L171-L177 https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/Neuron.sol#L184-L190 https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/Neuron.sol#L98-L112
Vulnerability details
Impact
The admin of Neuron.sol has the capability to transfer NRN tokens from any account, presenting a potential risk to users holding NRN tokens.
Bug Description
Neuron.sol features an admin who can assign STAKER_ROLE and SPENDER_ROLE to specific addresses. Holders of these roles can autonomously set allowances for any account to themselves, effectively granting them the authority to spend tokens from any account.
Despite the trust placed in the owner of the Neuron.sol contract, granting such extensive powers poses a potential risk to token holders, particularly if the token is also traded on secondary markets. The significant authority embedded in an ERC20 token like this should be addressed to mitigate potential risks.
Proof of Concept
N/A
Tools Used
Foundary.
Recommended Mitigation Steps
There are two proposed solutions to mitigate the risk:
Assessed type
Access Control