Submitted by 0x1f8b
The attacker can initialize the contract, take malicious actions, and allow it to be re-initialized by the project without any error being noticed.
The initialize method of theCollateral contract does not contain the initializer modifier, it delegates this process to check if the factory is different from address(0) in theUFactoryProvider__initialize call, however the factory_is other than address(0), so an attacker could use front-running by listening to the memory pool, initialize the contract with a factory=address(0), perform malicious actions, and still allow it to be started later by the I draft the contract without noticing any error.
Source reference:
Manual review
Use initializer modifier
kbrizzle (Perennial) marked as duplicate:
Alex the Entreprenerd (judge) commented:
Alex the Entreprenerd (judge) commented:
Alex the Entreprenerd (judge) commented:
kbrizzle (Perennial) commented:
Alex the Entreprenerd (judge) commented:
Alex the Entreprenerd (judge) commented:
kbrizzle (Perennial) commented:
Alex the Entreprenerd (judge) commented:
