Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wickie - Not using nonReentrant modifer, although inherited from ReentrancyGuardUpgradable allows reentrancy. #187

Open
sherlock-admin3 opened this issue Nov 30, 2024 · 0 comments

Comments

@sherlock-admin3
Copy link
Contributor

sherlock-admin3 commented Nov 30, 2024

wickie

Medium

Not using nonReentrant modifer, although inherited from ReentrancyGuardUpgradable allows reentrancy.

Summary

The contract NounsAuctionHouseV3.sol() inherits OZ's ReentrancyGuardUpgradeable but does not use the nonReentrant modifer that comes with it. Since external calls are always done to the auction's last bidder, this opens up opportunities to re-enter into the contract. Although the safeTransferETH() limits the gas usage to 30000, this could stay leads to read-only reentrancy in external contracts utilizing the Auction House.

Root Cause

nonReentrant modifer is inherited but not used in functions.

Internal pre-conditions

A malicious contract has to enter the auction.

External pre-conditions

No response

Attack Path

1.A malicious contract enters the auction.
2.When another users enter, the auction house calls to the malicious contract with last bidding value.
3.Malicious contract reenters into the contract.

Impact

Although reentrancy is possible, it is not clear what an attacker can achieve by it. Nevertheless, nonReentrant modifier should be added to functions, since it is clear that the developers inherited the ReentrancyGuardUpgradable to disable reentrancy.

PoC

No response

Mitigation

Add nonReentrant modifers to functions.

@sherlock-admin4 sherlock-admin4 changed the title Sneaky Berry Wolf - Not using nonReentrant modifer, although inherited from ReentrancyGuardUpgradable allows reentrancy. wickie - Not using nonReentrant modifer, although inherited from ReentrancyGuardUpgradable allows reentrancy. Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant