Discovered a vulnerability in the emergencyPause and emergencyResume functions of a smart contract, where unchecked msg.value can lead to unintended Ether retention.
The functions set the executionFee directly equal to msg.value, without validating whether the sent Ether exceeds the required fee. Excess Ether sent is not refunded and is wrongly treated as the fee.
Code Snippets:
This flaw could result in financial losses for users sending more Ether than the execution fee requires, as there's no system to refund the surplus. Such incidents could undermine user trust and contract credibility.
Manual code review and analysis.
Urgently revise these functions to include:
Validation checks against msg.value to ascertain it doesn't exceed the necessary executionFee.
Automatic refunds for any excess Ether received, ensuring only the intended fee amount is retained.
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.