Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 910

Reentrancy Attack

What is Reentrancy Attack?

Reentrancy AttackA smart-contract exploit where an external call lets the attacker re-enter the calling function before its state is updated, draining funds in a recursive loop.


Reentrancy happens when a contract sends ETH or tokens to an external address (often via call, transfer, or an ERC-777 hook) before it has updated its own internal accounting. The attacker controls that external address and uses the callback to invoke the original withdrawal function again, repeating the cycle until the contract is drained. Variants include single-function, cross-function, cross-contract, and read-only reentrancy. Mitigations include the checks-effects-interactions pattern, OpenZeppelin's ReentrancyGuard, pull-payment designs, and avoiding low-level calls to untrusted contracts. The 2016 attack on The DAO is the canonical example and led to the Ethereum/Ethereum Classic hard fork.

Examples

  1. 01

    The DAO hack (June 2016) drained about 3.6 million ETH using recursive splitDAO calls.

  2. 02

    The Cream Finance 2021 hot-fix incident exploited cross-function reentrancy via ERC-777 callbacks.

Frequently asked questions

What is Reentrancy Attack?

A smart-contract exploit where an external call lets the attacker re-enter the calling function before its state is updated, draining funds in a recursive loop. It belongs to the Web3 & Blockchain category of cybersecurity.

What does Reentrancy Attack mean?

A smart-contract exploit where an external call lets the attacker re-enter the calling function before its state is updated, draining funds in a recursive loop.

How does Reentrancy Attack work?

Reentrancy happens when a contract sends ETH or tokens to an external address (often via call, transfer, or an ERC-777 hook) before it has updated its own internal accounting. The attacker controls that external address and uses the callback to invoke the original withdrawal function again, repeating the cycle until the contract is drained. Variants include single-function, cross-function, cross-contract, and read-only reentrancy. Mitigations include the checks-effects-interactions pattern, OpenZeppelin's ReentrancyGuard, pull-payment designs, and avoiding low-level calls to untrusted contracts. The 2016 attack on The DAO is the canonical example and led to the Ethereum/Ethereum Classic hard fork.

How do you defend against Reentrancy Attack?

Defences for Reentrancy Attack typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for Reentrancy Attack?

Common alternative names include: Recursive call attack.

Related terms