Replay attack for deployHolographableContract() #178
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
edited-by-warden
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.
Function deployHolographableContract() is subject to reply attack since the signature does not sign chainid and address of the contract HolographFactory. As a result, the same signature can be replayed at another chain with another HolographFactory, leading to creating the contract to be created either before schedule or in the chain that is not planned.
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
Manual
Recommended Mitigation Steps
To avoid reply attack, the signature must sign the chainid and the address of the HolographFactory contract as well.
The text was updated successfully, but these errors were encountered: