Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Lack of access control in `payForTransaction`

Description: The payForTransaction function lacks access control, allowing anyone to potentially pay for transactions on behalf of the wallet.

Impact:

  1. An attacker notices a pending transaction from the wallet.

  2. The attacker calls payForTransaction with a high gas price, front-running the original transaction.

  3. This could lead to unexpected behavior or potential manipulation of transaction ordering.

Recommended Mitigation:

Add access control to the function

function payForTransaction(bytes32, bytes32, Transaction memory _transaction) external payable onlyOwner {
bool success = _transaction.payToTheBootloader();
if (!success) {
revert MondrianWallet2__FailedToPay();
}
}
Updates

Lead Judging Commences

bube Lead Judge 12 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Lack of access control in payForTransaction function

Support

FAQs

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