Reentrancy vulnerability in the MultiInvoker smart contract due to calls to unauthenticated external contracts
Summary
reentrancy vulnerability in the MultiInvoker smart contract due to calls to unauthenticated external contracts. The vulnerability can potentially allow malicious contracts to reenter the MultiInvoker.
Vulnerability Detail
The vulnerability is related to the invoke function in the MultiInvoker contract. This function executes a series of actions provided in the invocations array, which can include calls to various external contracts. However, the invoke function does not validate or authenticate these external contracts before interacting with them, potentially allowing untrusted contracts to be called.
Impact
The impact of this vulnerability can be severe. Malicious or unauthenticated external contracts could exploit this reentrancy vulnerability to disrupt the normal operation of the MultiInvoker contract. This may lead to unintended state changes, financial losses, or other security risks within the contract.
Implement proper authentication and validation checks for external contracts called within the invoke function. Ensure that only trusted and authenticated contracts are allowed to interact with the MultiInvoker. Additionally, consider implementing a strict access control mechanism to prevent unauthorized access to the invoke function and closely review the logic of each external contract call to ensure that reentrancy vulnerabilities are addressed. Regular security audits and testing are also recommended to identify and rectify potential issues.
0xVinylDavyl
medium
Reentrancy vulnerability in the MultiInvoker smart contract due to calls to unauthenticated external contracts
Summary
reentrancy vulnerability in the MultiInvoker smart contract due to calls to unauthenticated external contracts. The vulnerability can potentially allow malicious contracts to reenter the MultiInvoker.
Vulnerability Detail
The vulnerability is related to the invoke function in the MultiInvoker contract. This function executes a series of actions provided in the invocations array, which can include calls to various external contracts. However, the invoke function does not validate or authenticate these external contracts before interacting with them, potentially allowing untrusted contracts to be called.
Impact
The impact of this vulnerability can be severe. Malicious or unauthenticated external contracts could exploit this reentrancy vulnerability to disrupt the normal operation of the MultiInvoker contract. This may lead to unintended state changes, financial losses, or other security risks within the contract.
Code Snippet
https://github.com/sherlock-audit/2023-10-perennial/blob/main/perennial-v2/packages/perennial-extensions/contracts/MultiInvoker.sol#L115C4-L169C1
Tool used
Manual Review
Recommendation
Implement proper authentication and validation checks for external contracts called within the invoke function. Ensure that only trusted and authenticated contracts are allowed to interact with the MultiInvoker. Additionally, consider implementing a strict access control mechanism to prevent unauthorized access to the invoke function and closely review the logic of each external contract call to ensure that reentrancy vulnerabilities are addressed. Regular security audits and testing are also recommended to identify and rectify potential issues.