The issue of not clearing the previous owner from the isAdmin mapping during ownership transfers presents a significant security risk across multiple contracts in the AI Arena protocol. This oversight allows former owners to retain administrative privileges, potentially enabling unauthorized access and manipulation of contract functionalities. Such vulnerabilities compromise the security, integrity, and trustworthiness of the protocol, posing risks to both the platform's operations and its users' interests.
The contracts listed above are integral to the AI Arena protocol, each containing functions for ownership transfer and administrative privilege management. The absence of code to explicitly remove the previous owner's admin status in these contracts can lead to scenarios where former owners can still execute actions meant solely for the current owner or administrators.
For example, a typical ownership transfer function without properly updating the isAdmin mapping in AI Aren contracts look like:
Lines of code
https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/Neuron.sol#L1 https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/RankedBattle.sol#L1 https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/GameItems.sol#L1 https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/VoltageManager.sol#L1 https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/MergingPool.sol#L1 https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/FighterFarm.sol#L1
Vulnerability details
Impact
The issue of not clearing the previous owner from the
isAdmin
mapping during ownership transfers presents a significant security risk across multiple contracts in the AI Arena protocol. This oversight allows former owners to retain administrative privileges, potentially enabling unauthorized access and manipulation of contract functionalities. Such vulnerabilities compromise the security, integrity, and trustworthiness of the protocol, posing risks to both the platform's operations and its users' interests.Proof of Concept
The contracts listed above are integral to the AI Arena protocol, each containing functions for ownership transfer and administrative privilege management. The absence of code to explicitly remove the previous owner's admin status in these contracts can lead to scenarios where former owners can still execute actions meant solely for the current owner or administrators.
For example, a typical ownership transfer function without properly updating the
isAdmin
mapping in AI Aren contracts look like:This pattern creates a uniform vulnerability.
Tools Used
Recommended Mitigation Steps
ensure that any function that transf ownership includes steps to revoke the admin privileges of previous owner.
Assessed type
Context