https://github.com/Cyfrin/2024-08-kitty-fi/blob/main/src/KittyPool.sol#L45-L48
The contract does not thoroughly validate the existence of tokens, leading to potential security vulnerabilities.
The tokenExists
modifier checks if a token's associated vault exists by verifying the non-zero address of the vault. However, this check is insufficient as it does not ensure the vault is pointing to a legitimate and intended contract, leaving room for misconfiguration or attack vectors.
This vulnerability could lead to unauthorized minting or manipulation of vaults, which could compromise the integrity of the system and lead to loss of funds or incorrect collateral management.
Manual
Enhance the tokenExists
modifier to include additional checks, such as verifying the type and legitimacy of the vault contracts, to prevent misconfigurations or potential attacks.
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.