Skip to main content

What Is a Reentrancy Attack in Smart Contract Security?

A reentrancy attack occurs when a malicious contract repeatedly calls a function in a vulnerable contract before the first function call has completed its state update. This allows the attacker to drain funds by continuously withdrawing assets before the contract's balance is correctly debited.

It is a critical security flaw often mitigated by using the Checks-Effects-Interactions pattern.

How Did the DAO Hack Use a Reentrancy Vulnerability?
Why Are Fallback Functions Critical in a Reentrancy Scenario?
What Is a ‘Reentrancy Attack’ and How Does It Exploit Smart Contract Logic?
What Are the Differences between Single-Function and Cross-Function Reentrancy Attacks?