Skip to content
Business logic Audit finding Intermediate

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.

Ziusz Follow with klaus, maigadoh and 1 other

Originally disclosed on Sherlock

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.

Solidity
    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);
    }

Link to code

Internal Pre-conditions

N/A

External Pre-conditions

N/A

Attack Path

  1. Whitelist mode is off.
  2. Owner enables whitelist mode.
  3. Malicious operator front runs owner by registering.
  4. Now, if owner wants to unregister him, he must grant him the whitelist role and then unwhitelist him.
  5. This would mean that the malicious operator would be granted the whitelist role for at least one block.
  6. 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

The original report as published on Sherlock, by Ziusz. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

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

  1. Whitelist mode is off.
  2. Owner enables whitelist mode.
  3. Malicious operator front runs owner by registering.
  4. Owner must grant whitelist role to unregister the operator.
  5. 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.

More by Ziusz

View all

2 more disclosed reports, best first.

More from Symbiotic Relay

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.