-
Notifications
You must be signed in to change notification settings - Fork 3
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
Attacker can block the payment and refund of funds in the auction. #1230
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-739
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
Comments
c4-submissions
added
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
labels
Nov 12, 2023
141345 marked the issue as duplicate of #364 |
141345 marked the issue as not a duplicate |
141345 marked the issue as duplicate of #1653 |
141345 marked the issue as duplicate of #843 |
141345 marked the issue as duplicate of #486 |
alex-ppg marked the issue as not a duplicate |
alex-ppg marked the issue as duplicate of #1759 |
c4-judge
added
duplicate-739
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
and removed
duplicate-1759
labels
Dec 4, 2023
alex-ppg marked the issue as partial-50 |
alex-ppg changed the severity to 2 (Med Risk) |
c4-judge
added
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
downgraded by judge
Judge downgraded the risk level of this issue
labels
Dec 9, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-739
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/AuctionDemo.sol#L104-L120
Vulnerability details
Impact
If the highest bidder's address in the auction belongs to a contract that does not implement the
onERC721Received()
function, callingclaimAuction()
becomes impossible. Consequently, the remaining funds from bids become trapped in the auction contract. This vulnerability can be exploited by an attacker who deliberately uses a contract without implementing the required function and aims to become the highest bidder, thereby blocking the refund process.Proof of Concept
Suppose an attacker employs a contract that does not implements
onERC721Received()
to callAuctionDemo::participateToAuction()
and manage to bid high enough to become the highest bidder. In this scenario when theAuctionDemo::claimAuction()
function is invoked to process the token transfer and refund remaining active bids, the call will revert due to the use ofsafeTransferFrom()
. It's important to note that this scenario can also occur unintentionally if the highest bidder's address is a contract that lacks the requiredERC721Receiver
functionality.Since the auction has ended (
block.timestamp <= minter.getAuctionEndTime(_tokenId)
), and there is no alternative method for bidders to retrieve their funds (ascancelBid
andcancelAllBids
are disabled when auctions ends), the token and all funds become permanently trapped within the contract. Thefore this issue is classified as high severity, as any attacker can exploit this vulnerability intentionally, effectively freezing all funds in the contract.Tools Used
Manual Review.
Recommended Mitigation Steps
Consider using
transferFrom()
instead ofsafeTransferFrom()
.Assessed type
ERC721
The text was updated successfully, but these errors were encountered: