Skip to content

Latest commit

 

History

History
40 lines (22 loc) · 1.04 KB

File metadata and controls

40 lines (22 loc) · 1.04 KB

Sneaky Neon Skunk

Medium

Storage Collision Exploit in Upgradeable Contracts Due to Missing Storage Gap

Summary

Implementations contracts like Auction.sol and others lacks a reserved storage gap, which is crucial for upgradeable contracts. Without this gap, new storage variables added during future upgrades may overwrite existing variables, leading to unintended behavior, data corruption, or security vulnerabilities. Attackers could exploit this oversight by manipulating storage during upgrades to cause unpredictable or malicious outcomes. Properly reserving a storage gap in the contract's layout is essential to prevent storage collisions and ensure safe upgrades.

Root Cause

https://github.com/sherlock-audit/2024-12-plaza-finance/blob/main/plaza-evm/src/Auction.sol#L29

Internal Pre-conditions

No response

External Pre-conditions

No response

Attack Path

No response

Impact

No response

PoC

No response

Mitigation

  // Storage gap for future upgrades
    uint256[50] private __gap;