DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

Not only the auction owner can end the auction after the previously established time

Summary

The auctionEnd() function is accessible to everyone after the auction contract is created, meaning that anyone can call it and end the auction at any chosen moment. All functions affecting the course of the auction should be secured with appropriate access controls.

Vulnerability Details

Anyone can end the auction after its allotted time has expired.

https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordAuction.sol#L181

POC

function testEndAuction() public {
address bidder = address(0x2);
vm.startPrank(bidder);
auction.auctionEnd();
vm.stopPrank();

Impact

Anyone can end the auction after its allotted time has expired.

Tools Used

Manual Review, Foundry

Recommendations

You should add an Access Control mechanism to the auctionEnd function so that the decision to end the auction is reserved exclusively for the auction owner.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.