Reentrancy is dangerous because it lets an attacker interrupt a function mid-execution and make the protocol observe inconsistent state. In lending systems, that can inflate collateral records, bypass balance checks, and unlock borrowing power that is not actually backed by assets. The result is often direct liquidity drain rather than a narrow accounting error.
Why reentrancy is so destructive in collateralised lending
Collateralised lending protocols depend on the contract seeing a clean sequence of events: deposit, update collateral, check health, then allow borrowing or withdrawal. Reentrancy breaks that sequence by letting an external call re-enter before state changes are final, so the protocol can make a lending decision against stale balances, stale debt, or both.
The severity comes from leverage. A small state inconsistency is not just an accounting nuisance in a lending market, because borrowing power, liquidation thresholds, and available liquidity are all computed from those same values. Once an attacker can observe an intermediate state and act again inside the same transaction, they can turn a local inconsistency into systemic credit creation.
In practice, that means the protocol may credit collateral more than once, fail to decrement balances before a second borrow, or let assets be withdrawn while the system still believes the position is healthy. The attack therefore targets the protocol’s trust in sequential execution, not only its arithmetic.
Why lending-specific mechanics make the blast radius larger
Reentrancy is especially severe in collateralised lending because many of the important checks are relative, not absolute. Health factor, collateral ratio, and borrow capacity are derived values, so if one of the inputs is temporarily wrong, the protocol may approve an action that would fail once the transaction completes. That is why the bug often becomes a direct liquidity drain rather than a narrow logic error.
The danger also compounds across integrations. Lending systems often move tokens, update interest state, trigger liquidation logic, and interact with external assets or wrappers in a single flow. Any external transfer or callback can create a re-entry point, and once the attacker re-enters, the protocol may re-evaluate the same position under a better-looking state than the one that should actually govern the action.
Because the attacker can chain repeated entries before the transaction settles, the issue is not merely “double spend” in the classic sense. It is a control-flow break that lets the attacker borrow against assets that have not yet been fully accounted for, which is why the failure can empty reserves quickly when liquidity is available.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK, OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.AC-4 — Access Control | Reentrancy breaks enforcement of permitted state transitions and borrowing access. |
| Recommendation — Enforce least-privilege execution paths so external callbacks cannot re-enter sensitive lending logic. | ||
| CIS Controls v8 | 6 — Access Control Management | Sensitive lending actions need strict control of who or what can invoke them mid-flow. |
| Recommendation — Restrict callable paths around collateral and borrowing state with tightly scoped access controls. | ||
| MITRE ATT&CK | T1190 — Exploit Public-Facing Application | Reentrancy is an application-layer exploitation technique against exposed contract logic. |
| Recommendation — Model contract entry points as attack surfaces and test for re-entrant abuse paths. | ||
| OWASP Agentic AI Top 10 | A1 — Tool Misuse | External callbacks can misuse trusted execution paths, analogous to unsafe delegated actions. |
| Recommendation — Prevent untrusted callbacks from regaining control over sensitive financial actions. | ||
| OWASP Non-Human Identity Top 10 | NHI-07 — Access and Privilege Misuse | The core issue is unauthorized reuse of authority during an in-flight transaction. |
| Recommendation — Design state changes so authority cannot be replayed before the first action completes. | ||
Practitioner Guidance
What to verify: Every function that updates collateral, debt, or liquidation state should complete its accounting before any external interaction. If the code must call out, confirm that the protocol cannot be re-entered into a path that reuses the same collateral or credit state.
Decision rule: Treat any external call inside a lending-critical path as a trust boundary. If a callback can influence borrow limits, collateral balances, or repayment order, redesign the flow rather than relying on post-hoc checks.
What practitioners underestimate: The worst cases are often not the obvious “borrow twice” scenarios, but the paths where a seemingly benign helper call, token transfer, or hook reopens the same valuation logic before the first update is committed.
Practitioner takeaway: In collateralised lending, reentrancy is severe because it converts a temporary state inconsistency into enforceable borrowing power, so the only safe design is to make state transitions final before any code outside the protocol can run.