Skip to content

Latest commit

 

History

History
39 lines (20 loc) · 823 Bytes

File metadata and controls

39 lines (20 loc) · 823 Bytes

Uneven Pine Sheep

High

Logical Error in migrateToNewHSG Function

Summary

The migrateToNewHSG function incorrectly disables the new HatsSignerGate (HSG) module instead of the existing one. This can lead to unintended behavior where the new HSG is disabled immediately after being attached, leaving the old HSG still enabled. https://github.com/sherlock-audit/2024-11-hats-protocol/blob/49de29508904e95b3cfaaf27d2e76c527429c019/hats-zodiac/src/HatsSignerGate.sol#L353

Root Cause

No response

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

No response

PoC

No response

Mitigation

Replace s.execDisableHSGAsModule(_newHSG); with s.execDisableHSGAsModule(address(this)); to correctly disable the existing HSG.