Skip to content
Business logic Audit finding Intermediate

Global pause does not stop flash loans

The protocol-wide pause flag set by the emergency pause function is never checked by the flash-loan path, which only verifies per-reserve pause and active state. After admins pause the protocol, any external user could still take flash liquidity from reserves that remain individually active and run arbitrary receiver callback logic in the same transaction.

v12 Follow with ahahaHard1k, AllTooWell and 18 others

Originally disclosed on Code4rena

Submitted by v12, also found by ahahaHard1k, AllTooWell, Anirruth, boserba77, dee24, DemoreX, dev2be, Killerpl123, Magnum, miinee, Phronesis54, piki, qed, rakanaji, ret2basic, rfa, twicek, viper3, yaractf, and zp6119126

Found by V12

  • contracts/kinetic-router/src/flash_loan.rs #L36
  • contracts/kinetic-router/src/router.rs #L415
  • contracts/kinetic-router/src/emergency.rs #L6

Targets

  • KineticRouterContract::internalflashloanwithreserve_data
  • KineticRouterContract::flash_loan
  • KineticRouterContract::pause

Affected Locations

  • KineticRouterContract.internalflashloanwithreserve_data: This helper enforces only reserve-local conditions such as is_flashloan_enabled(), is_active(), and configuration.is_paused(), so global pause is never applied before funds are lent out.
  • KineticRouterContract.flash_loan: Public flash-loan entrypoint forwards execution without checking the protocol-wide storage::is_paused(&env) flag first.
  • KineticRouterContract.pause: The emergency pause sets the shared PAUSED flag, but that state is not consumed by the flash-loan path.

Description

The protocol-wide PAUSED flag set by pause is not enforced by the flash-loan execution path. The public flash_loan entrypoint authenticates and forwards into the internal flash-loan flow, where internal_flash_loan_with_reserve_data checks only reserve-local conditions such as is_flashloan_enabled(), is_active(), and configuration.is_paused(). Because no storage::is_paused(&env) guard is applied, flash loans can still reach asset disbursal and borrower callback execution while the router is globally paused. This is inconsistent with other state-changing flows cited in the findings, which do consult the global pause flag before proceeding. The emergency stop therefore fails to cover one of the protocol’s most powerful liquidity primitives.

Root Cause

The flash-loan path validates only per-reserve pause state and never checks the global PAUSED flag set by pause, so flash_loan enforces the wrong pause invariant.

Impact

After admins pause the protocol, any external user can still obtain flash liquidity from reserves that remain individually active and unpaused, then execute arbitrary receiver callback logic in the same transaction. This weakens incident containment and can allow flash-loan-assisted exploit chains, manipulation strategies, or other emergency-time activity to continue while operators believe user operations are halted.

Proof of Concept

See this gist for full Proof of Concept


The original report as published on Code4rena, by v12. 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 flash-loan path validates only per-reserve pause state and never checks the global `PAUSED` flag set by `pause`, so `flash_loan` enforces the wrong pause invariant.

Impact

After admins pause the protocol, any external user could still obtain flash liquidity from reserves that remain individually active and unpaused, then execute arbitrary receiver callback logic in the same transaction, weakening incident containment.

What the attacker needed

Protocol is globally paused by admin; a reserve remains active and flash-enabled

The fix

The flash-loan entrypoint should check the global pause flag before forwarding into the internal flash-loan flow.

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 flash loan is a loan borrowed and repaid within a single transaction, often used to move large amounts of money briefly. The protocol has an emergency stop button meant to halt user operations, but the flash-loan feature never checks that stop button, only per-reserve settings. So even after the emergency stop is pressed, someone could still borrow flash liquidity and run their own callback code.

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 v12

View all

37 more disclosed reports, best first.

More from K2

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.