https://github.com/Cyfrin/2024-07-zaros/blob/main/src/perpetuals/branches/TradingAccountBranch.sol#L405-L410
The notifyAccountTransfer function does not have a permission check to ensure that only the Account NFT contract can call it. This could potentially allow unauthorized contracts or users to call this function and update the owner of a trading account.
The notifyAccountTransfer function lacks comprehensive access control, as it only checks if the caller is the TradingAccountToken. However, it does not ensure the integrity and authentication of the caller in other critical functions.
Unauthorized Ownership Transfer: Malicious actors can call this function to change the ownership of trading accounts, leading to potential account hijacking.
Manual
Add a permission check to ensure that only the Account NFT contract can call the notifyAccountTransfer function.
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.