The projects, specifically the contract KittyConnect.sol
allows the addition of shop partners through the KittyConnect:addShop
function. However there is no possibility to remove these entries. The absence of removal functionality poses potential challenges in managing and updating the list of registered shop partners.
The vulnerability arises from the inability to revoke the status of a shop partner once it has been granted. Without the capability to remove a shop partner, the contract's owner cannot effectively update the list of authorized shops. This can lead to an accumulation of inactive or unauthorized shop partners, potentially compromising the integrity and security of the system.
The impact of this vulnerability could be significant:
Lack of Maintenance: The inability to remove inactive or unauthorized shop partners may result in an outdated list, leading to confusion and inefficiency in managing partnerships;
Security Risks: Inactive, unauthorized or malicious shop partners still have access to certain functions within the contract, posing security risks or creating potential attack vectors. For example, they can still mint NFTs without being restricted;
User Experience: Users may encounter difficulties in distinguishing between active and inactive shop partners, potentially leading to erroneous transactions or interactions.
Manual code review
It is advisable to develop and implement a function to remove shop partners from the contract's list of authorized partners. This function should be accessible only to the contract owner and include proper access controls and validation checks. An example could be the following:
You can also add this test function to your KittyConnect.t.sol
test suite to verify that it works correctly
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.