Skip to content
PenyuOnCore
Menu
  • Home
  • Core Ecosystem Analysis
  • Personal Finance & Investing
  • Make Money Online
  • Bitcoin
  • About Us
Menu
Orange padlock with a red X next to the title ReentrancyGuardReentrantCall and the error selector 0x3ee5aeb5

ReentrancyGuardReentrantCall Error: What It Means and How to Fix It

Posted on November 20, 2026

ReentrancyGuardReentrantCall is a custom error from OpenZeppelin Contracts v5. It means a function protected by the nonReentrant modifier was entered while another nonReentrant function on the same contract was still running. Sometimes that is the guard correctly blocking a reentrancy attack, but very often it is a plain bug: one nonReentrant function calls another one in the same contract.

Below we explain how the guard works, show the cases that trigger the error (all reproduced in local Foundry tests with OpenZeppelin 5.7.0, plus a fork of Core mainnet), and give the fixes for developers and for users who just saw a failed transaction.

What ReentrancyGuardReentrantCall Means

OpenZeppelin’s ReentrancyGuard is a simple lock. When a nonReentrant function starts, it checks a status value. If the status is already “entered”, it reverts with:

error ReentrancyGuardReentrantCall();

If not, it sets the status to “entered”, runs the function body, and resets the status when the function finishes. The error has no arguments. Its 4-byte selector is 0x3ee5aeb5, which we confirmed with cast sig "ReentrancyGuardReentrantCall()" and also saw as the raw revert data in our tests. If a block explorer or RPC error shows revert data of exactly 0x3ee5aeb5, this is the error.

The key detail is in the OpenZeppelin source comment: “because there is a single nonReentrant guard, functions marked as nonReentrant may not call one another.” The lock covers the whole contract, not one function.

Older versions: “ReentrancyGuard: reentrant call”

OpenZeppelin v5.0.0 replaced revert strings with custom errors. In v4.x the same situation reverts with the string ReentrancyGuard: reentrant call. We checked this against OpenZeppelin 4.9.6 in Foundry. The cause and the fix are the same.

What Triggers It: Test Results

We wrote a small vault contract and ran these scenarios in Foundry (Solidity 0.8.24, OpenZeppelin 5.7.0) on 20 Nov 2026. The test file is short, and you can copy the patterns below.

Scenario Result
withdrawAll() (nonReentrant) calls public withdraw() (nonReentrant) in the same contract Reverts with ReentrancyGuardReentrantCall (0x3ee5aeb5), no attacker involved
Malicious contract re-enters withdraw() from its receive() function Inner call reverts with 0x3ee5aeb5; the vault’s own require(ok, "send failed") then reverts the whole transaction
Re-entrant call to a view function marked nonReentrantView Reverts with 0x3ee5aeb5 while a withdrawal is in progress; works normally otherwise
Contract A (nonReentrant) calls contract B (nonReentrant) Works: each contract has its own lock
Same bug using ReentrancyGuardTransient on a Core mainnet fork Reverts with the same 0x3ee5aeb5 selector

1. A nonReentrant function calls another nonReentrant function

This is the most common cause for developers. It looks harmless:

function withdraw(uint256 amount) public nonReentrant {
    balance[msg.sender] -= amount;
    (bool ok, ) = msg.sender.call{value: amount}("");
    require(ok, "send failed");
}

function withdrawAll() external nonReentrant {
    withdraw(balance[msg.sender]); // lock is already set -> ReentrancyGuardReentrantCall
}

withdrawAll() sets the lock, then calls withdraw(), which finds the lock set and reverts. In our test this reverted every time with revert data 0x3ee5aeb5.

2. A real reentrancy attempt was blocked

When a contract sends ETH (or CORE on Core) to another contract, the receiver’s receive() function runs and can try to call back in. With nonReentrant in place, the callback reverts with ReentrancyGuardReentrantCall. That is the guard doing its job.

One detail from our test is worth knowing: the error you finally see may not be ReentrancyGuardReentrantCall. When the attacker let the inner revert bubble up, the vault’s low-level call returned false and the transaction failed with the vault’s own message, send failed. When the attacker caught the inner error with try/catch, the outer withdrawal succeeded, and the attacker only got its own deposit back. So a trace (for example forge test -vvvv or cast run) is often needed to see the guard firing underneath another error.

3. A view function protected by nonReentrantView

OpenZeppelin 5.5.0 added nonReentrantView, a read-only version of the modifier for view functions. It reverts with the same error if it is called while a nonReentrant function is running. That stops “read-only reentrancy,” where another protocol reads half-updated state. If an integration you wrote calls such a getter from inside a callback, this is why it fails.

Diagram of the OpenZeppelin ReentrancyGuard lock: a nonReentrant entry sets the lock to entered, a nested call or callback into any nonReentrant function on the same contract hits the locked state and reverts with ReentrancyGuardReentrantCall 0x3ee5aeb5, and the fix routes public entry points to an internal function
One lock per contract: any second nonReentrant entry before the first one finishes reverts with 0x3ee5aeb5.

How to Fix ReentrancyGuardReentrantCall

Fix 1: Move shared logic into an internal function

This is the fix OpenZeppelin recommends in the source comments. Put the real work in an internal (or private) function with no modifier, and make each external entry point nonReentrant:

function _withdraw(uint256 amount) internal {
    balance[msg.sender] -= amount;
    (bool ok, ) = msg.sender.call{value: amount}("");
    require(ok, "send failed");
}

function withdraw(uint256 amount) external nonReentrant { _withdraw(amount); }
function withdrawAll() external nonReentrant { _withdraw(balance[msg.sender]); }

In our test, this version of withdrawAll() succeeded and returned the full 1 ETH deposit, and it still blocked the re-entry attempt.

Fix 2: Don’t remove the guard to “make it work”

If the error comes from a callback (a token hook, an ETH transfer, a flash loan), the guard is probably right. Removing nonReentrant brings back the risk it was protecting against. Instead, follow checks-effects-interactions: update balances before external calls, and keep external calls at the end of the function.

Fix 3: Remember the lock is per contract

Our test confirmed that contract A’s nonReentrant function can call contract B’s nonReentrant function without error, because each contract stores its own status. If you get ReentrancyGuardReentrantCall, the second entry is into the same contract (or a contract that shares its storage, such as a proxy and its implementation). Find that contract with a trace.

Fix 4: Debug with a trace

Run the failing call with forge test -vvvv, or replay a mainnet transaction locally on a fork. Our guide to forking Core mainnet with Anvil shows the setup. Look for the second call into a nonReentrant function before the first one returns.

ReentrancyGuardTransient and Core

ReentrancyGuardTransient (added in v5.1.0) stores the lock in transient storage (EIP-1153) instead of normal storage. It throws the same ReentrancyGuardReentrantCall error. Its docs say it “only works on networks where EIP-1153 is available,” and the v5.7.0 source marks the storage-based ReentrancyGuard as deprecated, to be replaced by the transient version in v6.0.

We checked Core: a read-only eth_call to https://rpc.coredao.org (chain ID 1116) running bytecode that does TSTORE then TLOAD returned 1, so Core mainnet executes transient-storage opcodes. In a Foundry fork of Core mainnet (block 40,607,911), the transient-guard vault with the nested-call bug reverted with 0x3ee5aeb5, the same as the storage version. If you compile for Core, set evm_version = "cancun" or later, since ReentrancyGuardTransient requires Solidity 0.8.24+. Our explainer on the invalid opcode PUSH0 error covers which EVM versions Core accepts.

If You’re a User, Not a Developer

If a dApp transaction failed with ReentrancyGuardReentrantCall or revert data 0x3ee5aeb5, retrying the same action usually fails again, because the contract logic causes it, not your wallet. Typical cases are a router or aggregator that calls back into the same protocol in one transaction, or a bug in the dApp’s contract. Try the simpler direct action (for example, withdraw a specific amount instead of “withdraw all”), and report the transaction hash to the project. Failed transactions still cost gas, so don’t keep resending. Our guide to the general “execution reverted” error explains how to read revert data. Related OpenZeppelin v5 errors we’ve covered include SafeERC20FailedOperation and OwnableUnauthorizedAccount.

FAQ

What is error 0x3ee5aeb5?

It is the selector of ReentrancyGuardReentrantCall() from OpenZeppelin Contracts v5. A nonReentrant function was entered while another one on the same contract was still running.

Does ReentrancyGuardReentrantCall mean I was hacked?

No. It means a reentrant call was blocked. Most of the time it’s a coding mistake (nested nonReentrant calls), not an attack.

Can two nonReentrant functions call each other?

Not in the same contract. Use one internal function for the logic and call it from separate external nonReentrant functions. Calls across different contracts are fine, because each contract has its own lock.

Is the error the same in ReentrancyGuardTransient?

Yes. Both variants declare ReentrancyGuardReentrantCall() with the same 0x3ee5aeb5 selector. Only where the lock is stored is different.

Disclaimer: This article is for educational purposes only and is not financial or security-audit advice. Test any contract changes yourself and get a professional audit before deploying contracts that hold user funds.

Recent Posts

  • iStock Contributor Payout: $100 Minimum, Payment Schedule & Methods (2026)
  • Panic Code 0x11 in Solidity: “Arithmetic Underflow or Overflow” Explained and Fixed
  • Can You Transfer a Child Trust Fund to a Lifetime ISA? (2026/27 Rules)
  • How to Use web3.py with Core Blockchain (Chain ID 1116)
  • Shutterstock Contributor Payout: Schedule, $25 Minimum & Why Payments Fail (2026)
Subscription form is not available at the moment
  • Altcoin News
  • Bitcoin
  • Core Ecosystem Analysis
  • DeFi
  • Free Crypto Signals
  • Make Money Online
  • Personal Finance & Investing
  • Token Analysis
  • About Us
  • Contact
  • Privacy Policy
  • Disclaimer
©2026 PenyuOnCore | Design: Newspaperly WordPress Theme