Initialization Vulnerability
An initialization vulnerability occurs when a smart contract is not properly initialized, allowing any user to call the initialization function and set themselves as the owner or administrator. This is a common mistake in proxy-based contracts, where the implementation contract must be initialized separately from the proxy.
If the initialization function is not protected, an attacker can front-run the deployment and take control of the contract immediately. This gives the attacker total authority over the contract's parameters and funds.
Developers must ensure that initialization functions are protected with a flag that prevents them from being called more than once. Proper deployment scripts and rigorous testing are essential to prevent this.