When transferring tokens not in whitelist on Ethereum to Terra with CrossAnchorBridge.depositStable() , the funds may get frozen
The bridge contract's token whitelist checks were commented out, so users could deposit non-whitelisted tokens. Those tokens cannot be processed on the Terra side, so the funds may become frozen on the bridge or on Terra.
Submitted by WatchPug, also found by BondiPestControl, broccoli, and defsec
In the current implementation of CrossAnchorBridge, all require that “Check that token is a whitelisted token” is commented out.
As a result, users may send transcations with the non-whitelisted tokens and as they can not be processd properly on the Terra side, the funds can be frozen on the brige contract or on the Terra side.
function handleStableToken(
address token,
uint256 amount,
uint8 opCode
) internal {
// Check that `token` is a whitelisted stablecoin token.
// require(whitelistedStableTokens[token]);
handleToken(token, amount, opCode);
}
function redeemStable(address token, uint256 amount) external {
// require(whitelistedAnchorStableTokens[token]);
handleToken(token, amount, OP_CODE_REDEEM_STABLE);
}
function lockCollateral(address token, uint256 amount) external {
// require(whitelistedCollateralTokens[token]);
handleToken(token, amount, OP_CODE_LOCK_COLLATERAL);
}
Recommended Mitigation Steps
Uncomment the whitelist codes.
bitn8 (Anchor) disagreed with severity
Alex the Entreprenerd (triage) commented:
Seems conditional, would recommend downgrading to Medium.
Albert Chon (judge) decreased severity to Medium
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 whitelist checks in the bridge's token-handling functions were commented out, so any token could be passed to the transfer logic.
Impact
Non-whitelisted tokens sent through the bridge may become frozen on the bridge contract or on the Terra side, as they cannot be processed properly there.
What the attacker needed
User sends a non-whitelisted token; bridge accepts the deposit
The fix
The whitelist checks should be re-enabled by uncommenting the require statements.
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 bridge moves tokens between two blockchains. This bridge was supposed to accept only a list of approved tokens, but the code that enforces that list was disabled. If someone sends an unapproved token, the other side may not know what to do with it, and the money can get stuck.
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.