The bridgable ERC721 contracts in Cairo implement an upgrade function, but the owner is set to the bridge, which does not expose any method for upgrading the collection contracts. This restricts the ability to upgrade contracts, posing a risk if updates are needed.
The ERC721 contracts are designed to be upgradeable; however, the ownership of these contracts is assigned to the bridge. Since the bridge itself lacks a function to trigger upgrades, the collection contracts cannot be upgraded without modifying the bridge contract first. This limits flexibility and may hinder the protocol’s ability to respond to necessary updates or security patches.
The inability to upgrade collection contracts can lead to issues in maintaining or securing the protocol over time. If a critical update or bug fix is required, the current design prevents timely upgrades, potentially exposing the protocol to vulnerabilities.
Change Ownership: Assign the ownership of the collections to the bridge admin instead of the bridge contract, allowing the admin to manage upgrades.
Expose Upgrade Function: Add a function in the bridge contract that enables the upgrade of the collection contracts directly, ensuring that upgrades can be executed when needed.
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
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.