The approveCollateralTokenForAave
function lacks appropriate access controls, allowing any external account to invoke the function.
Lack of Access Control:
The function is marked as external
, which makes it callable by any account outside the contract.
There is no restriction mechanism such as onlyOwner
or role-based access control to limit who can call this function.
Delegation to Internal Function:
The function delegates the actual logic to _approveCollateralTokenForAave
. However, the lack of safeguards in the parent function leaves it exposed to misuse.
Unintended State Changes:
Any user can re-approve tokens, possibly altering the contract's intended interactions with Aave.
Loss of Integrity:
The unrestricted nature of this function undermines the integrity of the contract and may lead to unintended or malicious outcomes.
Manual code review of the provided smart contract.
Implement Access Control:
Use onlyOwner
or role-based access control to restrict access to the function.
Example:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.