MED: Holographer contract may be destructed using delegatecall to trusted address - Holographer's fallback(), HolographERC721's fallback() #494
Labels
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
responded
The Holograph team has reviewed and responded
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2022-10-holograph/blob/f8c2eae866280a1acfdc8a8352401ed031be1373/contracts/enforcer/Holographer.sol#L229
Vulnerability details
Description
The Holograph contracts use delegatecall pattern to execute enforcers from Holographer. In the Holographer fallback, getHolographEnforcer is called to calculate a delegatecall destination:
The issue is that a malicious / compromised admin can update the registry and make getReservedContractTypeAddress() return an arbitrary address. From there, they are able to do anything, from destroying the contract to re-distributing the balances as they see fit.
Impact
Rogue registry represents a major centralization risk which will always exist in each deployed contract.
Tools Used
Manual audit
Recommended Mitigation Steps
Unless explicitly asked by deployer, make the calculated Enforcer be set in stone after the initialization stage.
The text was updated successfully, but these errors were encountered: