FinalProxy is a proxy that can be upgraded, but if owner calls finalUpgrade it will deploy the final upgrade using Create3 and it can no longer be upgraded. To determine if it has gotten the final upgrade or not, the function _finalImplementation is called:
https://github.com/code-423n4/2023-07-axelar/blob/main/contracts/gmp-sdk/upgradable/FinalProxy.sol#L18
https://github.com/code-423n4/2023-07-axelar/blob/main/contracts/gmp-sdk/upgradable/FinalProxy.sol#L57-L64
The issue is that if the implementation supports deploying with Create3, a user could use the salt (keccak256('final-implementation')) and deploy a final implementation without calling finalImplementation, since Create3 only uses msg.sender and salt to determine the address.
InterchainTokenService, which is the only implementation in scope using FinalProxy, does however not appear to be vulnerable to this, since all the salts used for deploys are calculated, not supplied. But future implementations/other contracts using FinalProxy might be.
Test in proxy.js:
VulnerableDeployer.sol:
Have the user deploy the final implementation and then upgrade to it without using Create3. That way, a vulnerable implementation contract cannot be abused and taken over.
