Skip to content
Access control Audit finding Intermediate

Rebalancer can steal funds from markets by sending to custom receiver through Everclear Bridge

The Everclear bridge integration in the rebalancer passed a caller-supplied receiver address straight into the bridge intent without checking it. A rebalancer operator could set that receiver to an address it controls and divert the funds meant for rebalancing.

Angry_Mustache_Man Follow with ExtraCaterpillar, SafetyBytes and 6 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-07-malda-judging/issues/124

Found by

Angry_Mustache_Man, ExtraCaterpillar, SafetyBytes, Sevyn, Ziusz, axelot, bulgari, cergyk, elolpuer

Description

The rebalancer contract is called on sendMsg with a message encoded as bytes (_msg.message). This message is specific for the bridge contract, and in the case of EverclearBridge it is of the form IntentParams:

EverclearBridge.sol#L40-L50:

Solidity
    struct IntentParams {
        uint32[] destinations;
        //@audit receiver is left unchecked
        bytes32 receiver;
        address inputAsset;
        bytes32 outputAsset;
        uint256 amount;
        uint24 maxFee;
        uint48 ttl;
        bytes data;
        IFeeAdapter.FeeParams feeParams;
    }

We notice that the parameter receiver is left entirely unchecked, and the rebalancer EOA can provide an address controlled by it, stealing the user funds which should be send for rebalancing.

EverclearBridge.sol#L111-L121:

Solidity
(bytes32 id,) = everclearFeeAdapter.newIntent(
    params.destinations,
    params.receiver,
    params.inputAsset,
    params.outputAsset,
    params.amount,
    params.maxFee,
    params.ttl,
    params.data,
    params.feeParams
);

Recommendation

Check that params.receiver is a valid market on the destination chain

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/malda-protocol/malda-lending/pull/103

CergyK

Fix looks good, now params.receiver is forced to be equal to _market

The original report as published on Sherlock, by Angry_Mustache_Man. 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 bridge message builder accepted an arbitrary receiver address from the caller instead of forcing it to the destination market.

Impact

A rebalancer operator could redirect rebalancing funds to an address it controls, stealing user funds.

What the attacker needed

Control of the rebalancer EOA

The fix

The receiver in the bridge parameters is now forced to equal the destination market, and the protocol team fixed this in a pull request.

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 rebalancer moves money between markets on a user's behalf. Here the code that builds the bridge message trusted a 'receiver' field supplied by whoever runs the rebalancer, so that operator could point the money at their own wallet instead of the intended market. The fix makes the receiver always match the market the funds are meant for.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Angry_Mustache_Man

View all

2 more disclosed reports, best first.

More from Malda

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.