Skip to main content

Why Are Cross-Function Reentrancy Attacks Generally Harder to Detect?

Cross-function reentrancy attacks are harder to detect because the vulnerability is not contained within a single function. A security audit or a static analysis tool might examine a function and see that it correctly follows the Checks-Effects-Interactions pattern internally.

However, it might miss the fact that an external call in that function could lead to a callback into a different function that shares and manipulates the same state variables. Detecting this requires a holistic analysis of the entire contract's state and all possible execution paths, which is significantly more complex.

What Are the Differences between Single-Function and Cross-Function Reentrancy Attacks?
Can a Reentrancy Attack Be Performed without a Fallback Function?
Do Reentrancy Guards Protect against Both Single-Function and Cross-Function Attacks?
What Is the Risk of Early Assignment on the Purchased Put Option?