Enabling the whitelist can grant a malicious operator a temporary whitelisted status
The unwhitelist function requires the operator to already be whitelisted, so when whitelist mode is enabled, a malicious operator can front-run the owner by registering and force the owner to whitelist them temporarily in order to remove them. This grants the attacker whitelisted status for at least one block, potentially enabling further abilities.
Source: https://github.com/sherlock-audit/2025-06-symbiotic-relay-judging/issues/361
Found by
Ziusz, klaus, maigadoh, zark
Summary
N/A
Root Cause
The root cause of this vulnerability is that in order for unwhitelist call to success, the operator must be whitelisted.
function _unwhitelistOperator(
address operator
) internal virtual {
if (!isOperatorWhitelisted(operator)) {
revert OperatorsWhitelist_OperatorNotWhitelisted();
}
_getOperatorsWhitelistStorage()._whitelisted[operator] = false;
if (isWhitelistEnabled() && isOperatorRegistered(operator)) {
_unregisterOperator(operator);
}
emit UnwhitelistOperator(operator);
}
Internal Pre-conditions
N/A
External Pre-conditions
N/A
Attack Path
- Whitelist mode is off.
- Owner enables whitelist mode.
- Malicious operator front runs owner by registering.
- Now, if owner wants to unregister him, he must grant him the whitelist role and then unwhitelist him.
- This would mean that the malicious operator would be granted the whitelist role for at least one block.
- Since this is an SDK, it is very possible that the whitelist role will be connected with further abilities.
Impact
Malicious actor can frontrun the whitelist mode enabled and in this way force the owners to whitelist him (in order to unwhitelist him) for at least one block. So the malicious actor can gain any abilities that a whitelisted operator can do without this being the goal of the owners of the network. If we take into account that the owner of the Middleware may be the Network which has time delays in the calls, this worsen the situation.
PoC
N/A
Mitigation
Allow the unwhitelist of an operator even if he is not whitelisted but the whitelist mode is on.
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/symbioticfi/relay-contracts/pull/33/commits/e655574ab282e2c42065166f1d6f8ef4a5004665
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 unwhitelist function reverts if the operator is not whitelisted, forcing owners to whitelist an operator before removing them.
Impact
A malicious operator could gain whitelisted status for at least one block, potentially enabling further abilities, especially if the owner is a Network with time delays.
What the attacker needed
Whitelist mode initially off; attacker can register as operator; attacker can front-run owner's transaction
The fix
The unwhitelist function should allow removal of an operator even if they are not whitelisted, as long as whitelist mode is on.
How it was found
- Whitelist mode is off.
- Owner enables whitelist mode.
- Malicious operator front runs owner by registering.
- Owner must grant whitelist role to unregister the operator.
- Malicious operator is whitelisted for at least one block.
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.
In this smart contract system, operators can be whitelisted (approved) or not. The function to remove an operator from the whitelist only works if the operator is currently whitelisted. So if whitelist mode is turned on, a bad operator can quickly register before being blocked, and then the owner has to first whitelist them (to satisfy the check) before removing them, giving the bad operator a brief moment of approval.
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.