Liquidation flow bypasses reserve-level access controls
The liquidation flow only checks liquidation-specific whitelist and blacklist rules, not the reserve-level access rules used by normal transfers, withdrawals and borrows. An address blocked or unapproved for a reserve could still repay restricted debt and receive restricted collateral or the liquidation bonus through liquidation.
v12 Follow with Agontuk, ahahaHard1k and 18 others
Originally disclosed on Code4rena
Submitted by v12, also found by Agontuk, ahahaHard1k, CircuitBreaker, coinsspor, david_xia, edoscoba, Fade_cyrpto, fuddle_yichi, gzeon, happykilling, honey-k12, lostOpcode, marvelous, Messiah, osuolale, oziajibogu, piki, qed, Tigerfrake, and Trynax
Found by V12
contracts/kinetic-router/src/liquidation.rs#L124contracts/kinetic-router/src/liquidation.rs#L102contracts/kinetic-router/src/router.rs#L463contracts/kinetic-router/src/router.rs#L700contracts/a-token/src/contract.rs#L471contracts/a-token/src/contract.rs#L316
Targets
- KineticRouterContract::internalliquidationcall
- ATokenContract::transferonliquidation
- ATokenContract::transferunderlyingto
- KineticRouterContract::liquidation_call
- KineticRouterContract::prepare_liquidation
- KineticRouterContract::execute_liquidation
Affected Locations
- KineticRouterContract.internalliquidationcall:
internal_liquidation_callenforces only liquidation-specific whitelist/blacklist checks before settling collateral and never composes them with reserve-level access validation. - ATokenContract.transferonliquidation:
transfer_on_liquidationcredits seized aTokens to the liquidator without the reserve whitelist/blacklist recipient checks used by normal transfers. - ATokenContract.transferunderlyingto:
transfer_underlying_tosends underlying collateral to the liquidation recipient without validating reserve access for that target. - KineticRouterContract.liquidation_call:
liquidation_callis an externally reachable liquidation entrypoint that exposes the reserve ACL bypass through the direct liquidation path. - KineticRouterContract.prepare_liquidation:
prepare_liquidationparticipates in the two-step liquidation flow and validates liquidation access without restoring reserve-specific gating. - KineticRouterContract.execute_liquidation:
execute_liquidationcompletes the two-step liquidation flow under liquidation-only ACL assumptions, allowing settlement without reserve checks.
Description
Liquidation handling applies a weaker access-control policy than normal reserve operations. In internal_liquidation_call, and likewise across the liquidation_call / prepare_liquidation / execute_liquidation flows, the router checks only validate_liquidation_whitelist_access and validate_liquidation_blacklist_access before moving reserve assets. Settlement then uses transfer_on_liquidation or transfer_underlying_to, and those helpers do not perform the reserve recipient validation that exists in normal transfer, withdraw, and borrow paths. As a result, an address that is blocked or not approved for a reserve can still repay restricted debt and receive restricted collateral through liquidation. When collateral is delivered as aTokens, the recipient can also end up holding in-protocol exposure to that restricted reserve despite the intended reserve gating.
Root Cause
The liquidation paths treat validate_liquidation_* as a substitute for validate_reserve_*, while transfer_on_liquidation and transfer_underlying_to also omit the reserve-level recipient checks enforced elsewhere.
Impact
A liquidator who is allowed by liquidation-specific lists but barred by reserve-specific lists can still participate in liquidations involving that reserve and collect the seized collateral or liquidation bonus. This breaks reserve-level permissioning and blacklist guarantees, allowing restricted addresses to obtain reserve assets and, in the aToken branch, potentially retain that exposure inside the protocol.
Proof of Concept
See this gist for full Proof of Concept
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 liquidation paths treat the liquidation whitelist/blacklist checks as a substitute for the reserve-level recipient checks, and the settlement helpers omit those reserve checks entirely.
Impact
A liquidator allowed by liquidation lists but barred by reserve lists could still take part in liquidations on that reserve and collect the seized collateral or bonus, breaking reserve-level permissioning and blacklist guarantees.
What the attacker needed
A restricted or blacklisted address; a liquidatable position in that reserve
The fix
The liquidation settlement helpers should apply the same reserve-level recipient validation used by normal transfer, withdraw and borrow paths.
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 lending protocol can mark certain reserves (asset pools) as restricted, so only approved addresses may hold or receive them. The liquidation code checked a separate, weaker list and skipped the reserve-level check, so a blocked address could still take collateral out of a restricted pool by liquidating someone. This means the restriction did not actually stop that address from getting the asset.
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.