Lack of check of chainType for DeployHolographableContract #261
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
invalid
This doesn't seem right
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
responded
The Holograph team has reviewed and responded
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Lines of code
https://github.com/code-423n4/2022-10-holograph/blob/f8c2eae866280a1acfdc8a8352401ed031be1373/contracts/HolographFactory.sol#L192
Vulnerability details
Impact
Detailed description of the impact of this finding.
In the implementation of the function DeployHolographableContract, chainType is never verified. Therefore, it is possible to deploy both the HolographerBytecode and SourceByteCode in the wrong chain.
Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
https://github.com/code-423n4/2022-10-holograph/blob/f8c2eae866280a1acfdc8a8352401ed031be1373/contracts/HolographFactory.sol#L192
Tools Used
Remix
Recommended Mitigation Steps
Also verify to make sure the chainType and the target chain match to avoid to deploy contracts in the wrong chain.
The text was updated successfully, but these errors were encountered: