Safe addresses can only be added but not removed
The smart contract allows adding addresses to a safe list but provides no function to remove them. If a safe-listed address later becomes malicious, the protocol cannot revoke its exemption from flash loan protections, potentially enabling a flash loan attack.
Submitted by 0xRajeev, also found by pauliax
The addSafeAddress() takes an address and adds it to a “safe list”. This is used in eoaOnly() to give exemption to safe addresses that are trusted smart contracts, when all other smart contacts are prevented from protocol interaction. The stated purpose is to allow only such partner/trusted smart contract integrations (project rep mentioned Argent wallet as the only one for now but that may change) an exemption from potential flash loan threats. But if there is a safe listed integration that needs to be later disabled, it cannot be done. The protocol will have to rely on other measures (outside the scope of this contest) to prevent flash loan manipulations which are specified as an area of critical concern.
Scenario: A trusted integration/partner address is added to the safe list. But that wallet/protocol/DApp is later manipulated (by the project, its users or an attacker) to somehow launch a flash loan attack on the protocol. However, its address cannot be removed from the safe list and the protocol cannot prevent flash loan manipulations from that source because of its exemption. Contract/project will have to be redeployed.
Recommend changing addSafeAddress() to isSafeAddress() with an additional bool parameter to allow both the enabling AND disabling of safe addresses.
kristian-gro (Gro) confirmed but disagreed with severity:
low risk - Made specifically for one partner in beta period, and planned to be removed. We added the removal function for sanity.
Confirmed and Fix has been implemented in release version.
I’ll keep medium risk because this could put the protocol into a one way street and not being able to remove safe addresses is quite dangerous. Medium risk.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The contract only implements a function to add safe addresses, with no corresponding function to remove them.
Impact
A safe-listed address that is later compromised or turned malicious cannot be removed, so the protocol cannot prevent flash loan manipulations from that source and may need to be redeployed.
What the attacker needed
A safe address is added; that address later becomes malicious
The fix
The function should be changed to allow both enabling and disabling of safe addresses, and the project confirmed a fix was implemented.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract keeps a list of trusted addresses that are allowed to interact with it without extra checks. The problem is that once an address is added, there is no way to take it off the list. If that address later turns bad, the contract cannot stop it from doing harmful things.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.