F-2025-0010·missing-disable-initializers
Missing initializer protection enables potential initialization hijacking
TL;DR
Upgradeable StakingContract implementation is missing _disableInitializers() in its constructor, leaving the implementation contract initializable directly via the proxy pattern.
Severity
LOW
Impact
LOW
Likelihood
LOW
Method
MManual review
CAT.
Complexity
LOW
Exploitability
LOW
02Section · Description
Description
This issue was raised during the mitigation period while reviewing F-2025-0007.
The upgradeable StakingContract implementation is missing the _disableInitializers() call in its constructor.
When using the transparent proxy pattern with OpenZeppelin's upgradeable contracts, the implementation contract should have its initializers disabled to prevent attackers from directly initialising the implementation contract (not the proxy).
Without this protection, an attacker could potentially:
- Call
initialize()directly on the implementation contract. - Set themselves as the owner of the implementation.
- Potentially cause confusion or interfere with proxy operations.
03Section · Recommendation
Recommendation
Add a constructor that disables initializers:
solidity
/// @custom:oz-upgrades-unsafe-allow constructorconstructor() {_disableInitializers();}
04Section · Resolution
Resolution
Ample Protocol: Fixed.
Zealynx: Verified.
Status
Fixed