The AaveDIVAWrapper
contract contains token approval functions does not implement any form of access control, allowing anyone to call it. This creats a severe security risk as these functions should be restricted to privileged roles.
The following functions in the AaveDIVAWrapper
contract lack access control:
https://github.com/Cyfrin/2025-01-diva/blob/1b6543768c341c2334cdff87b6dd627ee2f62c89/contracts/src/AaveDIVAWrapper.sol#L92
The vulnerability has the following potential impacts:
Unauthorized users can approve any token for Aave integration
Malicious actors could exploit this to approve unintended or malicious tokens
Inconsistency with the contract's security model where other sensitive functions are properly protected
Potential manipulation of the protocol's token approval system
Manual code review
Add the onlyOwner
modifier to both functions to restrict access to the contract owner:
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.