Skip to main content

Can a Reentrancy Guard Be Bypassed?

A reentrancy guard can be bypassed if the attacker finds a way to call the critical function without triggering the guard mechanism, or if the guard is incorrectly implemented. For example, if the guard is only placed on the withdraw() function but the contract has another function, emergencyWithdraw() , that doesn't use the guard, the attacker could exploit the unprotected function.

It can also be bypassed in complex, multi-contract systems if the attacker can find a path that re-enters the contract through a function that calls the guarded function indirectly.

What Are the Differences between Single-Function and Cross-Function Reentrancy Attacks?
How Can a Reentrancy Guard Modifier Offer a Simpler Alternative to This Pattern?
What Is the Difference between a Preimage Attack and a Collision Attack?
What Is the Difference between a Preimage Attack and a Collision Attack in Hashing?