26446 - [SC - Insight] Consider implementing a two step process in tra...
Description
Proof of Concept
/**
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferProxyOwnership(address newOwner) public onlyProxyOwner {
require(newOwner != address(0));
emit ProxyOwnershipTransferred(proxyOwner(), newOwner);
setUpgradabilityOwner(newOwner);
}
* @dev Sets the address of the owner
*/
function setUpgradabilityOwner(address newProxyOwner) internal {
bytes32 position = proxyOwnerPosition;
assembly {
sstore(position, newProxyOwner)
}
}
Impact
Recommended Mitigation Steps
Proof of concept
Previous26431 - [SC - Insight] High Risk in transfer of proxyOwnershipNext26468 - [SC - Insight] Fee-on-transfer tokens can be used to steal oth...
Last updated
Was this helpful?