The contract allows registration of any token that has an associated Aave aToken without pre-vetting, enabling potential registration of malicious or compromised tokens as collateral.
The current collateral token registration system in _registerCollateralToken() only checks if:
The token is not already registered
The token has an associated aToken in Aave
This is insufficient as it lacks a proper whitelisting mechanism for pre-vetting tokens, creating security risks.
Current vulnerable code:
https://github.com/Cyfrin/2025-01-diva/blob/main/contracts/src/AaveDIVAWrapperCore.sol#L71
A malicious token gets listed on Aave
The token can be immediately registered in this contract through _registerCollateralToken()
The token becomes usable as collateral without any vetting process
Implement a whitelist system to protect against malicious tokens:
This ensures tokens must be explicitly approved before they can be registered as collateral.
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.