This report highlights the unauthorized access vulnerability in the closeBidOffer
function within the DeliveryPlace
smart contract. This function allows unauthorized users to close bid offers, potentially leading to financial loss and market manipulation. The findings, potential impacts, and recommended mitigation measures are detailed below.
The closeBidOffer
function is designed to close a bid offer, refund the offer maker, and update the offer status. The function is defined as follows:
The function relies on _msgSender()
to determine if the caller is authorized to close the bid offer. The current access control mechanism checks if _msgSender()
matches offerInfo.authority
. However, if this check is bypassed or not implemented correctly, unauthorized users could potentially close bid offers they do not own.
The function relies on _msgSender()
to determine if the caller is authorized to close the bid offer. The current access control mechanism checks if _msgSender()
matches offerInfo.authority
. However, if this check is bypassed or not implemented correctly, unauthorized users could potentially close bid offers they do not own.
System Disruption: Unauthorized closure of offers and triggering refund mechanisms can disrupt normal operations, leading to inconsistencies and eroding trust in the system.
Manual Review
Implement Robust Access Controls: Utilize access control libraries or modifiers to ensure only authorized users can call sensitive functions. For example:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.