Skip to content
Access control Audit finding Intermediate

Global pause can be bypassed via direct aToken transfers, breaking containment across remediation

The protocol's global pause does not block direct aToken transfers, allowing a user to move collateral to a fresh address during an emergency pause. This lets the attacker evade later blacklisting of the original address and redeem the underlying after unpause.

hodlturk Follow with 0xepley, Agontuk and 14 others

Originally disclosed on Code4rena

Submitted by hodlturk, also found by 0xepley, Agontuk, BigLizzyaudit0x, coinsspor, daivo, Dest1ny_rs, edoscoba, Holl0w, maigadoh, MikePeth, oziajibogu, piki, princebeladiya, qed, rook6, and rox_k

K2 documents protocol pause as a global emergency control that “blocks all state-changing operations” (docs/04-COMPONENTS.md:1910-1913). In practice, that guarantee does not hold for the public aToken.transfer() path.

While the router correctly rejects paused user operations such as withdraw(), any holder of aTokens can still call the public aToken contract directly and move their paused position to a fresh address. During that transfer, the aToken contract calls back into the router’s validate_and_finalize_transfer() hook, which performs stateful transfer finalization without checking the global paused flag.

This allows a user whose paused position is being remediated during an incident response window to:

  1. move paused collateral to a clean address,
  2. survive subsequent blacklist/remediation actions applied to the original address, and
  3. redeem the underlying from the fresh address after unpause.

The issue is not just a bookkeeping inconsistency: the PoC demonstrates that collateral can be reassigned during pause and later redeemed from a fresh address after the original address is remediated.

Security Property Broken

Emergency containment / pause boundary

The intended property is that once the protocol is paused, it should act as a hard containment boundary for user-facing value reassignment until administrators complete mitigation.

That property is broken because direct aToken.transfer() remains live and still mutates:

  • aToken balances
  • router-side transfer-finalization state
  • the economic owner of withdrawable collateral after unpause

Root Cause

The global pause check exists on router entrypoints such as pause-gated liquidation/flash flows and router operations, but does not exist on the aToken transfer path or on the router transfer-finalization hook.

This is a pause-boundary bug, not a collateral-eligibility bug:

  • the attacker does not need the recipient to borrow against paused/frozen collateral,
  • the exploit works because a public value-moving path stays live during a protocol-wide emergency pause,
  • the critical outcome is post-remediation collateral reassignment and later redemption, not temporary overvaluation of collateral.

Relevant code

The documented pause invariant:

docs/04-COMPONENTS.md

- **Effect**: Blocks all state-changing operations

Source:

docs/04-COMPONENTS.md:1910-1913
- **Auth Required**: Emergency admin OR pool admin (M-04)
- **Effect**: Blocks all state-changing operations
- **Use Case**: Discovery of critical vulnerability
- **Reversibility**: Pool admin can unpause

Router pause entrypoints:

// contracts/kinetic-router/src/router.rs
pub fn pause(env: Env, caller: Address) -> Result<(), KineticRouterError> {
    crate::emergency::pause(env, caller)
}

pub fn unpause(env: Env, caller: Address) -> Result<(), KineticRouterError> {
    crate::emergency::unpause(env, caller)
}

Source:

contracts/kinetic-router/src/router.rs:1383-1388

Public aToken transfer path:

// contracts/a-token/src/contract.rs
fn transfer_internal(env: Env, from: Address, to: Address, amount: i128) -> Result<(), TokenError> {
    // ...
    let result = env.try_invoke_contract::<(), k2_shared::KineticRouterError>(
        &state.pool_address,
        &Symbol::new(&env, "validate_and_finalize_transfer"),
        args,
    );

    match result {
        Ok(Ok(())) => {}
        _ => return Err(TokenError::TransferFailed),
    }

    storage::set_scaled_balance(&env, &from, &new_from_balance);
    storage::set_scaled_balance(&env, &to, &new_to_balance);
    Ok(())
}

Source:

contracts/a-token/src/contract.rs:579-681

Router hook called by the aToken:

// contracts/kinetic-router/src/router.rs
pub fn validate_and_finalize_transfer(
    env: Env,
    underlying_asset: Address,
    from: Address,
    to: Address,
    amount: u128,
    from_balance_after: u128,
    to_balance_after: u128,
) -> Result<(), KineticRouterError> {
    let reserve_data = storage::get_reserve_data(&env, &underlying_asset)?;
    let reserve_id = k2_shared::safe_reserve_id(&env, reserve_data.id);

    reserve_data.a_token_address.require_auth();

    let mut from_config = storage::get_user_configuration(&env, &from);
    if from_config.has_any_borrowing() {
        let reserve_data = crate::calculation::update_state_without_store(&env, &reserve_data)?;
        let oracle_config = crate::price::get_oracle_config(&env)?;
        let oracle_to_wad = k2_shared::calculate_oracle_to_wad_factor(oracle_config.price_precision);
        validation::validate_user_can_withdraw(&env, &from, &underlying_asset, amount, &reserve_data, oracle_to_wad)?;
    }

    if from_balance_after == 0 {
        from_config.set_using_as_collateral(reserve_id, false);
        storage::set_user_configuration(&env, &from, &from_config);
    }

    if to_balance_after > 0 {
        let mut to_config = storage::get_user_configuration(&env, &to);
        if !to_config.is_using_as_collateral(reserve_id) {
            let active_count = to_config.count_active_reserves();
            if active_count >= storage::MAX_USER_RESERVES {
                panic_with_error!(&env, k2_shared::UserReserveError::MaxUserReservesExceeded);
            }
            to_config.set_using_as_collateral(reserve_id, true);
            storage::set_user_configuration(&env, &to, &to_config);
        }
    }

    Ok(())
}

Source:

contracts/kinetic-router/src/router.rs:1840-1887

There is no storage::is_paused(&env) guard in this flow.

Attack Path

Lowest-privilege attacker

Any user holding aTokens.

Concrete exploit sequence

  1. The attacker supplies collateral and receives aTokens.
  2. Admin pauses the protocol in response to an incident.
  3. Router withdraw() is correctly blocked while paused.
  4. The attacker calls aToken.transfer(from, fresh_address, amount) directly on the aToken contract.
  5. transfer_internal() succeeds and invokes the router’s validate_and_finalize_transfer() hook.
  6. The hook finalizes the transfer even though the protocol is paused.
  7. Admin blacklists or otherwise remediates the original address during the pause window.
  8. After unpause, the fresh address calls withdraw() and receives the underlying.

Why an attacker likes this

  • It is silent: the protocol is “paused”, but the attacker still repositions value.
  • It has low preconditions: only requires holding aTokens.
  • It defeats a security layer rather than a single business rule.
  • It converts pause from a containment boundary into a merely cosmetic router-only gate.

Impact

This issue means global pause no longer acts as a hard containment boundary.

The protocol’s own security documentation presents pause as an emergency brake. If a user can still move a paused collateral position to a fresh address, then:

  • the original address can be remediated while the economic claim has already been moved elsewhere,
  • pause no longer reliably preserves account-level containment during the remediation window,
  • a later unpause can leave the fresh address able to redeem the reassigned collateral.

The PoC shows actual collateral reassignment that survives later remediation of the original address, followed by successful underlying withdrawal from the fresh address after unpause.

Trusted Roles / Contest Rules

This finding does not require any trusted role compromise or malicious trusted-role behavior.

Lowest-privilege attacker:

  • any user holding aTokens

Trusted roles appear in the PoC only to model the protocol’s intended emergency workflow:

  • Emergency Admin.pause() is used as designed to halt user operations,
  • Pool Admin.set_reserve_blacklist() is used as designed to remediate the original address,
  • Pool Admin.unpause() is used as designed to resume the protocol afterward.

The bug is that despite those intended admin actions, the attacker can still move the paused position through a public user-facing token path and later redeem the underlying from a fresh address.

So the report does not rely on:

  • compromised admin keys,
  • malicious governance,
  • incorrect privileged configuration,
  • any trusted-role action outside documented authority.

Real-world impact

On live code, this matters most in the scenarios where pause is expected to buy operators time to respond safely:

  • active exploit response,
  • stolen key containment,
  • insider compromise,
  • address-level remediation or containment.

In those situations, operators often need a pause window to identify which accounts should be blocked and then apply blacklists or other controls before unpause.

Because this bug leaves the public aToken transfer path open, a malicious user can front-run remediation operationally:

  • move the claim on collateral to a clean address during the pause,
  • let the original address absorb the later remediation,
  • then redeem the underlying from the fresh address once the protocol resumes.

That is a concrete loss of containment: the protocol may still pause router operations, but the paused position is no longer pinned to the original address.

Why this is distinct

This report is specifically about protocol-global pause bypass.

It is not the same as reserve pause/freeze collateral-eligibility issues. Even if reserve-level collateral-enable bugs are already known, this finding remains distinct because:

  • the broken property here is the protocol-wide emergency pause guarantee,
  • the exploit path is the public aToken.transfer() path,
  • the economic outcome is persistent collateral reassignment across the pause window, with later redemption from a fresh address.

In particular, this report is not claiming that paused/frozen reserves can still be counted as collateral for new borrows. A separate finding could discuss collateral eligibility, but this report is narrower:

  • during a protocol-global pause, value can still be reassigned to a fresh address,
  • that reassignment survives later remediation of the original address,
  • the fresh address can later redeem real underlying.

This report also does not assume that every conceivable token-side action must be listed alongside router entrypoints in the documentation. The narrower claim is simply that the published pause invariant says pause blocks state-changing operations, yet public aToken.transfer() remains a live state-changing value-reassignment path during that pause window.

Based on the repository-accessible audit materials reviewed for this submission:

  • the previous-audit summary in docs/09-SECURITY.md documents pause mechanics (docs/09-SECURITY.md:625-687) but does not list a finding about a missing global pause guard on public aToken transfers, and
  • the accessible V12 High finding #44815 (K2-V12-High-output.md:37205-37230) is framed around collateral eligibility consistency on paused/frozen reserves through transfer_internal / validate_and_finalize_transfer / set_user_use_reserve_as_coll, with impact centered on fresh borrowing and collateral-bit griefing,
  • this report is narrower and different in framing: even without claiming fresh borrowing against paused/frozen collateral, protocol-global pause still permits public collateral reassignment that survives later remediation of the original address and can be redeemed after unpause.

Proof of Concept

See originzl finding for full Proof of Concept

Why this should be fix-priority

Pause is not just a cosmetic flag. It is presented as the protocol’s emergency containment layer.

If users can still move claims on collateral during pause, then:

  • response playbooks become unreliable,
  • blacklist/remediation sequencing becomes lossy,
  • operators cannot assume paused balances remain attached to the original address.

This is the kind of bug that matters most on live code, because it appears only when administrators are already in remediation mode.

Duplicate-Resistance Framing

The strongest and cleanest framing for this submission is:

Global emergency pause is not a real freeze because public aToken transfers remain live, enabling remediation evasion and post-unpause withdrawal from fresh addresses.

The weaker framing to avoid is:

paused/frozen reserve collateral still becomes enabled through token-side transfer

That weaker framing drifts toward reserve-level collateral-eligibility analysis. The core report here is instead about:

  • protocol-global pause semantics,
  • containment failure,
  • recoverability loss,
  • real fund escape.

Recommended Fix

Apply the protocol-global pause check consistently to all state-changing collateral movement paths, not only router entrypoints.

At minimum:

  1. Reject public aToken transfers while storage::is_paused() is true.
  2. Add a pause gate to validate_and_finalize_transfer().
  3. Review any other token-side or helper-side state mutation paths that bypass router pause guards.

A robust fix is to treat the pause boundary as applying to:

  • direct token transfers,
  • router callback hooks,
  • any state-changing internal bridge between token contracts and the router.

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

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 global pause check is missing from the aToken transfer path and the router's transfer-finalization hook, so direct token transfers remain live during a protocol-wide pause.

Impact

Global pause no longer acts as a hard containment boundary, allowing collateral to be reassigned to a fresh address and later redeemed after unpause, defeating address-level remediation.

What the attacker needed

Any user holding aTokens; protocol is paused; admin later blacklists original address

The fix

The protocol should reject public aToken transfers while paused and add a pause gate to validate_and_finalize_transfer().

How it was found

  1. The attacker supplies collateral and receives aTokens.
  2. Admin pauses the protocol in response to an incident.
  3. Router withdraw() is correctly blocked while paused.
  4. The attacker calls aToken.transfer(from, fresh_address, amount) directly on the aToken contract.
  5. transfer_internal() succeeds and invokes the router's validate_and_finalize_transfer() hook.
  6. The hook finalizes the transfer even though the protocol is paused.

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 'pause' is meant to freeze all activity during an emergency, like a big red stop button. Here, one specific action (moving a special token that represents a deposit) still worked while paused, so someone could quietly shift their deposit to another wallet and later withdraw it, even if the original wallet was blocked.

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 from K2

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.