What Is a Reentrancy Attack in Smart Contracts?

A reentrancy attack occurs when an external call from a smart contract to an untrusted contract "re-enters" the original contract before the first execution is complete. This typically happens in withdrawal functions where the balance is updated after the external call to send Ether.

The malicious contract can call the withdrawal function again and again, draining the contract's funds. It is a critical vulnerability in blockchain security.

What Is a ‘Reentrancy Attack’ and How Does It Exploit Smart Contract Logic?
How Is the Call Function in Solidity Related to Reentrancy?
What Is a Reentrancy Attack in Smart Contract Security?
What Is a Reentrancy Attack in the Context of Smart Contract Vulnerabilities?
Why Must State Updates Occur before External Calls?
Can a Contract with a High Gas Limit Still Be Safe from Reentrancy?
What Is a “Read-Only” Reentrancy Attack?
What Is a “Re-Entrancy Attack” in Smart Contracts?

Glossar