Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: low
Invalid

Frontrunning Risk in Ownership Initialization

Summary

The initializeOwnership function in Rescueable.sol is vulnerable to frontrunning attacks. This function allows any user to set themselves as the owner if they act before the intended owner, posing a significant security risk.

Vulnerability Details

The initializeOwnership function allows the setting of a new owner but lacks proper access control. This makes it vulnerable to frontrunning, where a malicious actor could exploit the function to become the owner before the intended owner, thereby gaining unauthorized control.

function initializeOwnership(address _newOwner) external {
if (owner() != address(0x0)) {
revert AlreadyInitialized();
}
_transferOwnership(_newOwner);
}

Without proper access control, this function can be exploited, allowing attackers to gain control of the contract.

Impact

  • Unauthorized Ownership: Malicious actors can exploit the initializeOwnership function to set themselves as the owner of the contract, gaining unauthorized control and potentially causing security issues.

Tools Used

Manual Review

Recommendations

Implement Access Control: Add proper access control to the initializeOwnership function to prevent unauthorized access. Consider using an initializer modifier or similar approach to restrict access to the intended deployer.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
Assigned finding tags:

[invalid] finding-Rescuable-initializeOwner-lack-access-control

Aside from `Rescuable.sol` being OOS, this is invalid based on codehawks guidelines regarding unprotected initializers. Additionally, this should be called concurrently when deploying a new proxy, but this submissions does not identify that particular issue of an uninitialized owner for proxy contracts

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!