From 27ada99f672f6bcf3226eb750dade2b70ad2f83d Mon Sep 17 00:00:00 2001 From: Serhat Dolmaci Date: Mon, 29 Jun 2026 23:19:41 +0300 Subject: [PATCH] fix(proxy): add zero-address check to upgradeTo If admin accidentally calls upgradeTo(address(0)), the proxy would revert on all non-admin calls. Add a require statement to catch this at the upgradeTo call site instead, preventing accidental DOS. Closes #3835 --- src/universal/Proxy.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/src/universal/Proxy.sol b/src/universal/Proxy.sol index 4fd53dae0..081db2460 100644 --- a/src/universal/Proxy.sol +++ b/src/universal/Proxy.sol @@ -58,6 +58,7 @@ contract Proxy { /// when this contract is called. /// @param _implementation Address of the implementation contract. function upgradeTo(address _implementation) public virtual proxyCallIfNotAdmin { + require(_implementation != address(0), "Proxy: implementation cannot be address(0)"); _setImplementation(_implementation); }