#48718 [SC-Insight] Contract Upgrade Completion DoS/Takeover Risk
Description
Brief/Intro
Vulnerability Details
@abimethod(allow_actions=["UpdateApplication"])
def complete_contract_upgrade(self) -> None:
"""Complete the scheduled upgrade
Anyone can call this method. <----------------- the issue
Raises:
AssertionError: If the contract is not initialised
AssertionError: If the complete upgrade timestamp is not met
AssertionError: If the contract SHA256 is not valid
"""
self._only_initialised()
# ... <checks if upgrade is scheduled> ...
# reset to new contract version
del self.scheduled_contract_upgrade.value
self.version += UInt64(1)
self.is_initialised = False # <-------- contract uninitialized
emit(UpgradeCompleted(program_sha256, ARC4UInt64(self.version)))Impact Details
References
Proof of Concept
Proof of Concept
PreviousFolks Smart Contract Library | Aud CompNext#48717 [SC-Insight] RateLimiter current capacity can be permanently held at zero
Was this helpful?