A critical vulnerability exists in the set_deadline
function of the crowdfunding contract where there is no validation to prevent setting deadlines in the past, potentially compromising the fundamental time-based constraints of the fundraising mechanism.
The problematic code segment reveals the lack of past deadline validation:
Key technical issues include:
No check to verify if the provided deadline is in the future
Allows setting deadlines in the past
Breaks the logical integrity of fundraising timelines
Potential manipulation of fund lifecycle
Compromises time-based fundraising constraints
The vulnerability creates severe consequences:
Ability to set invalid historical deadlines
Disruption of expected fundraising mechanics
Opportunities for malicious time manipulation
Setting deadlines that have already passed
Creating funds with retroactive time constraints
Undermining the purpose of time-based fundraising
Immediate and comprehensive recommendations include:
Implement Deadline Validation
Manual code review
Static code analysis
The creator has an incentive to pay attention to the deadline and provide correct data. If the `deadline` is set in the past, the campaign will be completed. If there are any funds the creator or the contributors (depending on the success of the campaign) can receive them. It is the creator's responsibility to set correct deadline, otherwise the creator can create a new campaign. There is no impact on the protocol from this missing check, so I consider this to be an informational issue.
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.